Commit f1bca34ebf94bf5ab4ba4644b5e62ce6b3efcb99
Committed by
Tom Rini
1 parent
627d74c79b
Exists in
smarc_8mq_lf_v2020.04
and in
11 other branches
ARM: chiliboard: move towards driver model and device-tree boot
This patch mostly enables DM drivers in board defconfig and all their dependencies. Additionally we remove ethernet platform data, as all details are in device-tree now. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Showing 2 changed files with 10 additions and 55 deletions Side-by-side Diff
board/grinn/chiliboard/board.c
... | ... | @@ -150,57 +150,4 @@ |
150 | 150 | return 0; |
151 | 151 | } |
152 | 152 | #endif |
153 | - | |
154 | -#if !defined(CONFIG_DM_ETH) && defined(CONFIG_DRIVER_TI_CPSW) && \ | |
155 | - !defined(CONFIG_SPL_BUILD) | |
156 | -static void cpsw_control(int enabled) | |
157 | -{ | |
158 | - /* VTP can be added here */ | |
159 | - | |
160 | - return; | |
161 | -} | |
162 | - | |
163 | -static struct cpsw_slave_data cpsw_slaves[] = { | |
164 | - { | |
165 | - .slave_reg_ofs = 0x208, | |
166 | - .sliver_reg_ofs = 0xd80, | |
167 | - .phy_addr = 0, | |
168 | - } | |
169 | -}; | |
170 | - | |
171 | -static struct cpsw_platform_data cpsw_data = { | |
172 | - .mdio_base = CPSW_MDIO_BASE, | |
173 | - .cpsw_base = CPSW_BASE, | |
174 | - .mdio_div = 0xff, | |
175 | - .channels = 8, | |
176 | - .cpdma_reg_ofs = 0x800, | |
177 | - .slaves = 1, | |
178 | - .slave_data = cpsw_slaves, | |
179 | - .ale_reg_ofs = 0xd00, | |
180 | - .ale_entries = 1024, | |
181 | - .host_port_reg_ofs = 0x108, | |
182 | - .hw_stats_reg_ofs = 0x900, | |
183 | - .bd_ram_ofs = 0x2000, | |
184 | - .mac_control = (1 << 5), | |
185 | - .control = cpsw_control, | |
186 | - .host_port_num = 0, | |
187 | - .version = CPSW_CTRL_VERSION_2, | |
188 | -}; | |
189 | - | |
190 | -int board_eth_init(bd_t *bis) | |
191 | -{ | |
192 | - int rv, n = 0; | |
193 | - | |
194 | - writel(RMII_MODE_ENABLE | RMII_CHIPCKL_ENABLE, &cdev->miisel); | |
195 | - cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RMII; | |
196 | - | |
197 | - rv = cpsw_register(&cpsw_data); | |
198 | - if (rv < 0) | |
199 | - printf("Error %d registering CPSW switch\n", rv); | |
200 | - else | |
201 | - n += rv; | |
202 | - | |
203 | - return n; | |
204 | -} | |
205 | -#endif |
configs/chiliboard_defconfig
... | ... | @@ -29,20 +29,28 @@ |
29 | 29 | CONFIG_CMD_MTDPARTS=y |
30 | 30 | CONFIG_MTDIDS_DEFAULT="nand0=8000000.nand" |
31 | 31 | CONFIG_MTDPARTS_DEFAULT="mtdparts=8000000.nand:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)" |
32 | +CONFIG_OF_CONTROL=y | |
33 | +CONFIG_DEFAULT_DEVICE_TREE="am335x-chiliboard" | |
32 | 34 | CONFIG_ENV_IS_IN_MMC=y |
33 | 35 | CONFIG_BOOTCOUNT_LIMIT=y |
34 | 36 | CONFIG_DM_GPIO=y |
37 | +CONFIG_MISC=y | |
38 | +CONFIG_DM_MMC=y | |
35 | 39 | CONFIG_MMC_OMAP_HS=y |
36 | 40 | CONFIG_NAND=y |
37 | -CONFIG_DRIVER_TI_CPSW=y | |
41 | +CONFIG_DM_ETH=y | |
38 | 42 | CONFIG_MII=y |
43 | +CONFIG_DRIVER_TI_CPSW=y | |
39 | 44 | CONFIG_SPI=y |
40 | 45 | CONFIG_OMAP3_SPI=y |
46 | +CONFIG_TIMER=y | |
47 | +CONFIG_OMAP_TIMER=y | |
41 | 48 | CONFIG_USB=y |
49 | +CONFIG_DM_USB=y | |
42 | 50 | CONFIG_USB_MUSB_HOST=y |
43 | 51 | CONFIG_USB_MUSB_DSPS=y |
52 | +CONFIG_USB_MUSB_TI=y | |
44 | 53 | CONFIG_USB_STORAGE=y |
45 | 54 | CONFIG_FAT_WRITE=y |
46 | 55 | CONFIG_LZO=y |
47 | -CONFIG_OF_LIBFDT=y |