[U-Boot] How to add new device driver from Linux driver source

Dears,
Our system used u-boot as the boot code, and it would be like to support SD card.
We get the SD controller driver from vendor, it is linux source code.
Do you have any comments or documents about how to port this source code into u-boot source tree.
We would like to build it and try if this can work or should do modify on this source.
Thanks
Jack

Hi Jack,
2013/1/25 "Chen, Jack C.W. (陳志偉 IES)" Chen.JackCW@inventec.com
Dears,
Our system used u-boot as the boot code, and it would be like to support SD card.
We get the SD controller driver from vendor, it is linux source code.
What platform do you working with? Does the boot code and the peripherals are already in u-boot main line source tree? If the platform is already supported in mainline u-boot would be better for you to port this SD controller driver in mainline u-boot. People will be easier to review and test your driver on this platform and give you some comment. So if the platform is already supported in mainline u-boot, please send the patch of this SD card driver (in GPL way) then to add the extensibility of this platform in u-boot project. And if your driver is modified from Linux driver, please add the comment about where the Linux source and what version that you modified from.
Do you have any comments or documents about how to port this source code into u-boot source tree.
We would like to build it and try if this can work or should do modify on this source.
You can start by checking the definitions, data structures, and APIs in include/mmc.h. Hope we can see your patch of this SD driver, soon.
participants (2)
-
"Chen, Jack C.W. (陳志偉 IES)"
-
Macpaul Lin