arm: remove leftover code for dm* SoCs
Subsystems (9)
cover arm: remove leftover code for dm* SoCs
From: Bartosz Golaszewski <[email protected]>
Commit 6761946fb716 ("arm: Remove unmaintained davinci boards") removed support for certain DaVinci platforms. We still want to support the da850 chips though and I'm currently working on converting all remaining drivers to using the driver model (please don't remove it yet :)).
This series is the first step: let's remove all leftover dead code. This will make things easier when adding support for driver model to NAND and EMAC drivers.
Bartosz Golaszewski (5):
net: davinci_emac: drop support for unused PHYs
arm: davinci: remove dead code for PHYs used by DaVinci DM* boards
nand: davinci: remove dead code for dm644x
usb: musb_hcd: remove unnecessary ifdefs for dm* SoCs
arm: davinci: remove leftover code for dm* SoCs
arch/arm/mach-davinci/Makefile | 1 - arch/arm/mach-davinci/cpu.c | 116 ----- arch/arm/mach-davinci/dm355.c | 29 -- arch/arm/mach-davinci/dm365.c | 19 - arch/arm/mach-davinci/dm365_lowlevel.c | 459 ------------------ arch/arm/mach-davinci/dm644x.c | 80 --- arch/arm/mach-davinci/dm646x.c | 25 - arch/arm/mach-davinci/dp83848.c | 127 ----- arch/arm/mach-davinci/et1011c.c | 41 -- .../mach-davinci/include/mach/davinci_misc.h | 4 +- .../arm/mach-davinci/include/mach/emac_defs.h | 56 --- arch/arm/mach-davinci/include/mach/gpio.h | 14 +- arch/arm/mach-davinci/include/mach/hardware.h | 216 --------- arch/arm/mach-davinci/include/mach/i2c_defs.h | 4 - .../mach-davinci/include/mach/syscfg_defs.h | 49 -- arch/arm/mach-davinci/ksz8873.c | 52 -- arch/arm/mach-davinci/lxt972.c | 112 ----- arch/arm/mach-davinci/misc.c | 5 +- arch/arm/mach-davinci/psc.c | 76 --- arch/arm/mach-davinci/spl.c | 5 - drivers/mtd/nand/raw/davinci_nand.c | 39 -- drivers/net/ti/davinci_emac.c | 55 +-- drivers/usb/musb/musb_hcd.c | 6 - 23 files changed, 9 insertions(+), 1581 deletions(-) delete mode 100644 arch/arm/mach-davinci/dm355.c delete mode 100644 arch/arm/mach-davinci/dm365.c delete mode 100644 arch/arm/mach-davinci/dm365_lowlevel.c delete mode 100644 arch/arm/mach-davinci/dm644x.c delete mode 100644 arch/arm/mach-davinci/dm646x.c delete mode 100644 arch/arm/mach-davinci/dp83848.c delete mode 100644 arch/arm/mach-davinci/et1011c.c delete mode 100644 arch/arm/mach-davinci/include/mach/syscfg_defs.h delete mode 100644 arch/arm/mach-davinci/ksz8873.c delete mode 100644 arch/arm/mach-davinci/lxt972.c
Signature · 1 line
2.21.0
PATCH 1/5 net: davinci_emac: drop support for unused PHYs
From: Bartosz Golaszewski <[email protected]>
The boards with SoCs from the DaVinci DM* family used to come with different PHYs that needed special support implemented in mach-davinci.
Since the support for these chips has long been removed, we can now drop this unnused code from the emac driver.
--- drivers/net/ti/davinci_emac.c | 55 ++++------------------------------- 1 file changed, 6 insertions(+), 49 deletions(-)
drivers/net/ti/davinci_emac.c +6 -49
@@ -816,55 +816,12 @@ int davinci_emac_initialize(void) phy_id |= tmp &0x0000ffff ; -switch (phy_id) { -#ifdef PHY_KSZ8873 -case PHY_KSZ8873 : -sprintf (phy[i].name,"KSZ8873 @ 0x%02x" , - active_phy_addr[i]); - phy[i].init = ksz8873_init_phy; - phy[i].is_phy_connected = ksz8873_is_phy_connected; - phy[i].get_link_speed = ksz8873_get_link_speed; - phy[i].auto_negotiate = ksz8873_auto_negotiate; -break ; -#endif -#ifdef PHY_LXT972 -case PHY_LXT972 : -sprintf (phy[i].name,"LXT972 @ 0x%02x" , - active_phy_addr[i]); - phy[i].init = lxt972_init_phy; - phy[i].is_phy_connected = lxt972_is_phy_connected; - phy[i].get_link_speed = lxt972_get_link_speed; - phy[i].auto_negotiate = lxt972_auto_negotiate; -break ; -#endif -#ifdef PHY_DP83848 -case PHY_DP83848 : -sprintf (phy[i].name,"DP83848 @ 0x%02x" , - active_phy_addr[i]); - phy[i].init = dp83848_init_phy; - phy[i].is_phy_connected = dp83848_is_phy_connected; - phy[i].get_link_speed = dp83848_get_link_speed; - phy[i].auto_negotiate = dp83848_auto_negotiate; -break ; -#endif -#ifdef PHY_ET1011C -case PHY_ET1011C : -sprintf (phy[i].name,"ET1011C @ 0x%02x" , - active_phy_addr[i]); - phy[i].init = gen_init_phy; - phy[i].is_phy_connected = gen_is_phy_connected; - phy[i].get_link_speed = et1011c_get_link_speed; - phy[i].auto_negotiate = gen_auto_negotiate; -break ; -#endif -default : -sprintf (phy[i].name,"GENERIC @ 0x%02x" , - active_phy_addr[i]); - phy[i].init = gen_init_phy; - phy[i].is_phy_connected = gen_is_phy_connected; - phy[i].get_link_speed = gen_get_link_speed; - phy[i].auto_negotiate = gen_auto_negotiate; - } +sprintf (phy[i].name,"GENERIC @ 0x%02x" , + active_phy_addr[i]); + phy[i].init = gen_init_phy; + phy[i].is_phy_connected = gen_is_phy_connected; + phy[i].get_link_speed = gen_get_link_speed; + phy[i].auto_negotiate = gen_auto_negotiate;debug ("Ethernet PHY: %s\n" , phy[i].name);
Signature · 1 line
2.21.0
PATCH 2/5 arm: davinci: remove dead code for PHYs used by DaVinci DM* boards
In reply to Bartosz GolaszewskiFrom: Bartosz Golaszewski <[email protected]>
The support for DaVinci DM* boards has been dropped a while ago. The code for all those PHYs is no longer used and they have their own proper PHY drivers in drivers/net/phy anyway. Remove all dead code.
--- arch/arm/mach-davinci/Makefile | 1 - arch/arm/mach-davinci/dp83848.c | 127 ------------------ arch/arm/mach-davinci/et1011c.c | 41 ------ .../arm/mach-davinci/include/mach/emac_defs.h | 21 --- arch/arm/mach-davinci/ksz8873.c | 52 ------- arch/arm/mach-davinci/lxt972.c | 112 --------------- 6 files changed, 354 deletions(-) delete mode 100644 arch/arm/mach-davinci/dp83848.c delete mode 100644 arch/arm/mach-davinci/et1011c.c delete mode 100644 arch/arm/mach-davinci/ksz8873.c delete mode 100644 arch/arm/mach-davinci/lxt972.c
arch/arm/mach-davinci/Makefile +0 -1
@@ -12,7 +12,6 @@ obj-$(CONFIG_SOC_DM365) += dm365.o obj-$(CONFIG_SOC_DM644X) += dm644x.o obj-$(CONFIG_SOC_DM646X) += dm646x.o obj-$(CONFIG_SOC_DA850) += da850_pinmux.o -obj-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_FRAMEWORK) += spl.o
arch/arm/mach-davinci/dp83848.c deleted +0 -127
127 lines not on this page · raw message
arch/arm/mach-davinci/et1011c.c deleted +0 -41
41 lines not on this page · raw message
arch/arm/mach-davinci/include/mach/emac_defs.h +0 -21
@@ -69,25 +69,4 @@#define EMAC_MDIO_CLOCK_FREQ 2000000/* 2.0 MHz */ #endif -#define PHY_KSZ8873 (0x00221450) -int ksz8873_is_phy_connected (int phy_addr); -int ksz8873_get_link_speed (int phy_addr); -int ksz8873_init_phy (int phy_addr); -int ksz8873_auto_negotiate (int phy_addr); - -#define PHY_LXT972 (0x001378e2) -int lxt972_is_phy_connected (int phy_addr); -int lxt972_get_link_speed (int phy_addr); -int lxt972_init_phy (int phy_addr); -int lxt972_auto_negotiate (int phy_addr); - -#define PHY_DP83848 (0x20005c90) -int dp83848_is_phy_connected (int phy_addr); -int dp83848_get_link_speed (int phy_addr); -int dp83848_init_phy (int phy_addr); -int dp83848_auto_negotiate (int phy_addr); - -#define PHY_ET1011C (0x282f013) -int et1011c_get_link_speed (int phy_addr); -#endif /* _DM644X_EMAC_H_ */
arch/arm/mach-davinci/ksz8873.c deleted +0 -52
52 lines not on this page · raw message
arch/arm/mach-davinci/lxt972.c deleted +0 -112
112 lines not on this page · raw message
Signature · 1 line
2.21.0
PATCH 3/5 nand: davinci: remove dead code for dm644x
In reply to Bartosz GolaszewskiFrom: Bartosz Golaszewski <[email protected]>
The support for DaVinci DM* SoCs has been dropped. The code that used to be relevant to dm644x is no longer needed. Remove it.
--- drivers/mtd/nand/raw/davinci_nand.c | 39 ----------------------------- 1 file changed, 39 deletions(-)
drivers/mtd/nand/raw/davinci_nand.c +0 -39
@@ -730,43 +730,6 @@ static int nand_davinci_dev_ready(struct mtd_info *mtd)return __raw_readl (&davinci_emif_regs->nandfsr) &0x1 ; } -static void nand_flash_init (void ) -{ -/* This is for DM6446 EVM and *very* similar. DO NOT GROW THIS! -* Instead, have your board_init() set EMIF timings, based on its -* knowledge of the clocks and what devices are hooked up ... and -* don't even do that unless no UBL handled it. -*/ -#ifdef CONFIG_SOC_DM644X -u_int32_t acfg1 =0x3ffffffc ; - -/*------------------------------------------------------------------* -* NAND FLASH CHIP TIMEOUT @ 459 MHz * -* * -* AEMIF.CLK freq = PLL1/6 = 459/6 = 76.5 MHz * -* AEMIF.CLK period = 1/76.5 MHz = 13.1 ns * -* * -*------------------------------------------------------------------*/ - acfg1 =0 - | (0 <<31 )/* selectStrobe */ - | (0 <<30 )/* extWait */ - | (1 <<26 )/* writeSetup 10 ns */ - | (3 <<20 )/* writeStrobe 40 ns */ - | (1 <<17 )/* writeHold 10 ns */ - | (1 <<13 )/* readSetup 10 ns */ - | (5 <<7 )/* readStrobe 60 ns */ - | (1 <<4 )/* readHold 10 ns */ - | (3 <<2 )/* turnAround ?? ns */ - | (0 <<0 )/* asyncSize 8-bit bus */ - ; - -__raw_writel (acfg1, &davinci_emif_regs->ab1cr);/* CS2 */ - -/* NAND flash on CS2 */ -__raw_writel (0x00000101 , &davinci_emif_regs->nandfcr); -#endif -} -void davinci_nand_init (struct nand_chip *nand) {#if definedCONFIG_KEYSTONE_RBL_NAND
@@ -820,8 +783,6 @@ void davinci_nand_init(struct nand_chip *nand) nand->write_buf = nand_davinci_write_buf; nand->dev_ready = nand_davinci_dev_ready; - -nand_flash_init (); }int board_nand_init (struct nand_chip *chip) __attribute__((weak));
Signature · 1 line
2.21.0
PATCH 4/5 usb: musb_hcd: remove unnecessary ifdefs for dm* SoCs
In reply to Bartosz GolaszewskiFrom: Bartosz Golaszewski <[email protected]>
The support for DaVinci DM* SoCs has been dropped. The ifdefs in the musb_hcd driver are no longer needed. Remove them.
--- drivers/usb/musb/musb_hcd.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/usb/musb/musb_hcd.c +0 -6
@@ -327,9 +327,7 @@ static int ctrlreq_out_data_phase(struct usb_device *dev, u32 len, void *buffer) csr =readw (&musbr->txcsr); csr |=MUSB_CSR0_TXPKTRDY ; -#if !defined(CONFIG_SOC_DM365 ) csr |=MUSB_CSR0_H_DIS_PING ; -#endif writew (csr, &musbr->txcsr); result =wait_until_ep0_ready (dev,MUSB_CSR0_TXPKTRDY );if (result <0 )
@@ -352,9 +350,7 @@ static int ctrlreq_out_status_phase(struct usb_device *dev)/* Set the StatusPkt bit */ csr =readw (&musbr->txcsr); csr |= (MUSB_CSR0_TXPKTRDY |MUSB_CSR0_H_STATUSPKT ); -#if !defined(CONFIG_SOC_DM365 ) csr |=MUSB_CSR0_H_DIS_PING ; -#endif writew (csr, &musbr->txcsr);/* Wait until TXPKTRDY bit is cleared */
@@ -372,9 +368,7 @@ static int ctrlreq_in_status_phase(struct usb_device *dev)/* Set the StatusPkt bit and ReqPkt bit */ csr =MUSB_CSR0_H_REQPKT |MUSB_CSR0_H_STATUSPKT ; -#if !defined(CONFIG_SOC_DM365 ) csr |=MUSB_CSR0_H_DIS_PING ; -#endif writew (csr, &musbr->txcsr); result =wait_until_ep0_ready (dev,MUSB_CSR0_H_REQPKT );
Signature · 1 line
2.21.0
PATCH 5/5 arm: davinci: remove leftover code for dm* SoCs
In reply to Bartosz GolaszewskiFrom: Bartosz Golaszewski <[email protected]>
The support for DaVinci DM* SoCs has been dropped a while ago. There's still a lot of leftover code in mach-davinci though. Entirely remove certain files and modify the common code to no longer reference unsupported chips.
Note: all DaVinci platforms supported in u-boot now define SOC_DA8XX but not all define SOC_DA850 (e.g. omapl138). We can safely remove all ifdefs for the former, but let's leave the ones for the latter.
--- arch/arm/mach-davinci/cpu.c | 116 ----- arch/arm/mach-davinci/dm355.c | 29 -- arch/arm/mach-davinci/dm365.c | 19 - arch/arm/mach-davinci/dm365_lowlevel.c | 459 ------------------ arch/arm/mach-davinci/dm644x.c | 80 --- arch/arm/mach-davinci/dm646x.c | 25 - .../mach-davinci/include/mach/davinci_misc.h | 4 +- .../arm/mach-davinci/include/mach/emac_defs.h | 35 -- arch/arm/mach-davinci/include/mach/gpio.h | 14 +- arch/arm/mach-davinci/include/mach/hardware.h | 216 --------- arch/arm/mach-davinci/include/mach/i2c_defs.h | 4 - .../mach-davinci/include/mach/syscfg_defs.h | 49 -- arch/arm/mach-davinci/misc.c | 5 +- arch/arm/mach-davinci/psc.c | 76 --- arch/arm/mach-davinci/spl.c | 5 - 15 files changed, 3 insertions(+), 1133 deletions(-) delete mode 100644 arch/arm/mach-davinci/dm355.c delete mode 100644 arch/arm/mach-davinci/dm365.c delete mode 100644 arch/arm/mach-davinci/dm365_lowlevel.c delete mode 100644 arch/arm/mach-davinci/dm644x.c delete mode 100644 arch/arm/mach-davinci/dm646x.c delete mode 100644 arch/arm/mach-davinci/include/mach/syscfg_defs.h
arch/arm/mach-davinci/cpu.c +0 -116
@@ -27,25 +27,6 @@ DECLARE_GLOBAL_DATA_PTR;#define PLLC_PLLDIV8 0x170#define PLLC_PLLDIV9 0x174 -/* SOC-specific pll info */ -#ifdef CONFIG_SOC_DM355 -#define ARM_PLLDIV PLLC_PLLDIV1 -#define DDR_PLLDIV PLLC_PLLDIV1 -#endif - -#ifdef CONFIG_SOC_DM644X -#define ARM_PLLDIV PLLC_PLLDIV2 -#define DSP_PLLDIV PLLC_PLLDIV1 -#define DDR_PLLDIV PLLC_PLLDIV2 -#endif - -#ifdef CONFIG_SOC_DM646X -#define DSP_PLLDIV PLLC_PLLDIV1 -#define ARM_PLLDIV PLLC_PLLDIV2 -#define DDR_PLLDIV PLLC_PLLDIV1 -#endif - -#ifdef CONFIG_SOC_DA8XX unsigned int sysdiv[9 ] = {PLLC_PLLDIV1 ,PLLC_PLLDIV2 ,PLLC_PLLDIV3 ,PLLC_PLLDIV4 ,PLLC_PLLDIV5 ,PLLC_PLLDIV6 ,PLLC_PLLDIV7 ,PLLC_PLLDIV8 ,PLLC_PLLDIV9
@@ -110,103 +91,6 @@ int set_cpu_clk_info(void)return 0 ; } -#else /* CONFIG_SOC_DA8XX */ - -static unsigned pll_div (volatile void *pllbase,unsigned offset) -{ -u32 div; - - div =REG (pllbase + offset); -return (div &BIT (15 )) ? (1 + (div &0x1f )) :1 ; -} - -static inline unsigned pll_prediv (volatile void *pllbase) -{ -#ifdef CONFIG_SOC_DM355 -/* this register read seems to fail on pll0 */ -if (pllbase == (volatile void *)DAVINCI_PLL_CNTRL0_BASE ) -return 8 ; -else -return pll_div (pllbase,PLLC_PREDIV ); -#elif defined(CONFIG_SOC_DM365 ) -return pll_div (pllbase,PLLC_PREDIV ); -#endif -return 1 ; -} - -static inline unsigned pll_postdiv (volatile void *pllbase) -{ -#if defined(CONFIG_SOC_DM355 ) || defined(CONFIG_SOC_DM365 ) -return pll_div (pllbase,PLLC_POSTDIV ); -#elif defined(CONFIG_SOC_DM6446 ) -if (pllbase == (volatile void *)DAVINCI_PLL_CNTRL0_BASE ) -return pll_div (pllbase,PLLC_POSTDIV ); -#endif -return 1 ; -} - -static unsigned pll_sysclk_mhz (unsigned pll_addr,unsigned div) -{ -volatile void *pllbase = (volatile void *) pll_addr; -#ifdef CONFIG_SOC_DM646X -unsigned base =CONFIG_REFCLK_FREQ /1000 ; -#else -unsigned base =CONFIG_SYS_HZ_CLOCK /1000 ; -#endif - -/* the PLL might be bypassed */ -if (readl (pllbase +PLLC_PLLCTL ) &BIT (0 )) { - base /=pll_prediv (pllbase); -#if defined(CONFIG_SOC_DM365 ) - base *=2 * (readl (pllbase +PLLC_PLLM ) &0x0ff ); -#else - base *=1 + (REG (pllbase +PLLC_PLLM ) &0x0ff ); -#endif - base /=pll_postdiv (pllbase); - } -return DIV_ROUND_UP (base,1000 *pll_div (pllbase, div)); -} - -#ifdef DAVINCI_DM6467EVM -unsigned int davinci_arm_clk_get () -{ -return pll_sysclk_mhz (DAVINCI_PLL_CNTRL0_BASE ,ARM_PLLDIV ) *1000000 ; -} -#endif - -#if defined(CONFIG_SOC_DM365 ) -unsigned int davinci_clk_get (unsigned int div) -{ -return pll_sysclk_mhz (DAVINCI_PLL_CNTRL0_BASE , div) *1000000 ; -} -#endif - -int set_cpu_clk_info (void ) -{ -unsigned int pllbase =DAVINCI_PLL_CNTRL0_BASE ; -#if defined(CONFIG_SOC_DM365 ) - pllbase =DAVINCI_PLL_CNTRL1_BASE ; -#endif - gd->bd->bi_arm_freq =pll_sysclk_mhz (pllbase,ARM_PLLDIV ); - -#ifdef DSP_PLLDIV - gd->bd->bi_dsp_freq = -pll_sysclk_mhz (DAVINCI_PLL_CNTRL0_BASE ,DSP_PLLDIV ); -#else - gd->bd->bi_dsp_freq =0 ; -#endif - - pllbase =DAVINCI_PLL_CNTRL1_BASE ; -#if defined(CONFIG_SOC_DM365 ) - pllbase =DAVINCI_PLL_CNTRL0_BASE ; -#endif - gd->bd->bi_ddr_freq =pll_sysclk_mhz (pllbase,DDR_PLLDIV ) /2 ; - -return 0 ; -} - -#endif /* !CONFIG_SOC_DA8XX */ -/* * Initializes on-chip ethernet controllers. * to override, implement board_eth_init()
arch/arm/mach-davinci/dm355.c deleted +0 -29
@@ -1,29 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* -* SoC-specific code for tms320dm355 and similar chips -* -* Copyright (C) 2009 David Brownell -*/ - -#include <common.h> -#include <asm/arch/hardware.h> - - -void davinci_enable_uart0 (void ) -{ -lpsc_on (DAVINCI_LPSC_UART0 ); - -/* Bringup UART0 out of reset */ -REG (UART0_PWREMU_MGMT ) =0x00006001 ; -} - - -#ifdef CONFIG_SYS_I2C_DAVINCI -void davinci_enable_i2c (void ) -{ -lpsc_on (DAVINCI_LPSC_I2C ); - -/* Enable I2C pin Mux */ -REG (PINMUX3 ) |= (1 <<20 ) | (1 <<19 ); -} -#endif
arch/arm/mach-davinci/dm365.c deleted +0 -19
@@ -1,19 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* -* SoC-specific code for tms320dm365 and similar chips -*/ - -#include <common.h> -#include <asm/arch/hardware.h> - -void davinci_enable_uart0 (void ) -{ -lpsc_on (DAVINCI_LPSC_UART0 ); -} - -#ifdef CONFIG_SYS_I2C_DAVINCI -void davinci_enable_i2c (void ) -{ -lpsc_on (DAVINCI_LPSC_I2C ); -} -#endif
arch/arm/mach-davinci/dm365_lowlevel.c deleted +0 -459
459 lines not on this page · raw message
arch/arm/mach-davinci/dm644x.c deleted +0 -80
80 lines not on this page · raw message
arch/arm/mach-davinci/dm646x.c deleted +0 -25
@@ -1,25 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* -* SoC-specific code for TMS320DM646x chips -*/ - -#include <asm/arch/hardware.h> - -void davinci_enable_uart0 (void ) -{ -lpsc_on (DAVINCI_DM646X_LPSC_UART0 ); -} - -#ifdef CONFIG_DRIVER_TI_EMAC -void davinci_enable_emac (void ) -{ -lpsc_on (DAVINCI_DM646X_LPSC_EMAC ); -} -#endif - -#ifdef CONFIG_SYS_I2C_DAVINCI -void davinci_enable_i2c (void ) -{ -lpsc_on (DAVINCI_DM646X_LPSC_I2C ); -} -#endif
arch/arm/mach-davinci/include/mach/davinci_misc.h +1 -3
@@ -40,13 +40,11 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr);int davinci_configure_pin_mux (const struct pinmux_config *pins,int n_pins);int davinci_configure_pin_mux_items (const struct pinmux_resource *item,int n_items); -#if defined(CONFIG_DRIVER_TI_EMAC ) && defined(CONFIG_SOC_DA8XX ) +#if defined(CONFIG_DRIVER_TI_EMAC )void davinci_emac_mii_mode_sel (int mode_sel);#endif -#if defined(CONFIG_SOC_DA8XX )void irq_init (void );int da8xx_configure_lpsc_items (const struct lpsc_resource *item,const int n_items); -#endif #endif /* __MISC_H */
arch/arm/mach-davinci/include/mach/emac_defs.h +0 -35
@@ -23,50 +23,15 @@#include <asm/arch/hardware.h> -#ifdef CONFIG_SOC_DM365 -#define EMAC_BASE_ADDR (0x01d07000) -#define EMAC_WRAPPER_BASE_ADDR (0x01d0a000) -#define EMAC_WRAPPER_RAM_ADDR (0x01d08000) -#define EMAC_MDIO_BASE_ADDR (0x01d0b000) -#define DAVINCI_EMAC_VERSION2 -#elif defined(CONFIG_SOC_DA8XX )#define EMAC_BASE_ADDR DAVINCI_EMAC_CNTRL_REGS_BASE#define EMAC_WRAPPER_BASE_ADDR DAVINCI_EMAC_WRAPPER_CNTRL_REGS_BASE#define EMAC_WRAPPER_RAM_ADDR DAVINCI_EMAC_WRAPPER_RAM_BASE#define EMAC_MDIO_BASE_ADDR DAVINCI_MDIO_CNTRL_REGS_BASE#define DAVINCI_EMAC_VERSION2 -#else -#define EMAC_BASE_ADDR (0x01c80000) -#define EMAC_WRAPPER_BASE_ADDR (0x01c81000) -#define EMAC_WRAPPER_RAM_ADDR (0x01c82000) -#define EMAC_MDIO_BASE_ADDR (0x01c84000) -#endif - -#ifdef CONFIG_SOC_DM646X -#define DAVINCI_EMAC_VERSION2 -#define DAVINCI_EMAC_GIG_ENABLE -#endif -#ifdef CONFIG_SOC_DM646X -/* MDIO module input frequency */ -#define EMAC_MDIO_BUS_FREQ 76500000 -/* MDIO clock output frequency */ -#define EMAC_MDIO_CLOCK_FREQ 2500000/* 2.5 MHz */ -#elif defined(CONFIG_SOC_DM365 ) -/* MDIO module input frequency */ -#define EMAC_MDIO_BUS_FREQ 121500000 -/* MDIO clock output frequency */ -#define EMAC_MDIO_CLOCK_FREQ 2200000/* 2.2 MHz */ -#elif defined(CONFIG_SOC_DA8XX )/* MDIO module input frequency */ #define EMAC_MDIO_BUS_FREQ clk_get(DAVINCI_MDIO_CLKID)/* MDIO clock output frequency */ #define EMAC_MDIO_CLOCK_FREQ 2000000/* 2.0 MHz */ -#else -/* MDIO module input frequency */ -#define EMAC_MDIO_BUS_FREQ 99000000/* PLL/6 - 99 MHz */ -/* MDIO clock output frequency */ -#define EMAC_MDIO_CLOCK_FREQ 2000000/* 2.0 MHz */ -#endif #endif /* _DM644X_EMAC_H_ */
arch/arm/mach-davinci/include/mach/gpio.h +1 -13
@@ -5,21 +5,12 @@#ifndef _GPIO_DEFS_H_#define _GPIO_DEFS_H_ -#ifndef CONFIG_SOC_DA8XX -#define DAVINCI_GPIO_BINTEN 0x01C67008 -#define DAVINCI_GPIO_BANK01 0x01C67010 -#define DAVINCI_GPIO_BANK23 0x01C67038 -#define DAVINCI_GPIO_BANK45 0x01C67060 -#define DAVINCI_GPIO_BANK67 0x01C67088 - -#else /* CONFIG_SOC_DA8XX */ #define DAVINCI_GPIO_BINTEN 0x01E26008#define DAVINCI_GPIO_BANK01 0x01E26010#define DAVINCI_GPIO_BANK23 0x01E26038#define DAVINCI_GPIO_BANK45 0x01E26060#define DAVINCI_GPIO_BANK67 0x01E26088#define DAVINCI_GPIO_BANK8 0x01E260B0 -#endif /* CONFIG_SOC_DA8XX */ #define davinci_gpio_bank01 ((struct davinci_gpio *)DAVINCI_GPIO_BANK01)#define davinci_gpio_bank23 ((struct davinci_gpio *)DAVINCI_GPIO_BANK23)
@@ -31,10 +22,7 @@#define gpio_status () gpio_info()#endif #define GPIO_NAME_SIZE 20 -#if defined(CONFIG_SOC_DM644X ) -/* GPIO0 to GPIO53, omit the V3.3 volts one */ -#define MAX_NUM_GPIOS 70 -#elif defined(CONFIG_SOC_DA8XX ) && !defined(CONFIG_SOC_DA850 ) +#if !defined(CONFIG_SOC_DA850 )#define MAX_NUM_GPIOS 128#else #define MAX_NUM_GPIOS 144
arch/arm/mach-davinci/include/mach/hardware.h +0 -216
260 lines not on this page · raw message
arch/arm/mach-davinci/include/mach/i2c_defs.h +0 -4
@@ -8,10 +8,6 @@#ifndef _I2C_DEFS_H_#define _I2C_DEFS_H_ -#ifndef CONFIG_SOC_DA8XX -#define I2C_BASE 0x01c21000 -#else #define I2C_BASE 0x01c22000 -#endif #endif
arch/arm/mach-davinci/include/mach/syscfg_defs.h deleted +0 -49
49 lines not on this page · raw message
arch/arm/mach-davinci/misc.c +1 -4
@@ -68,7 +68,6 @@ err:/* * Set the mii mode as MII or RMII */ -#if defined(CONFIG_SOC_DA8XX )void davinci_emac_mii_mode_sel (int mode_sel) {int val;
@@ -80,7 +79,7 @@ void davinci_emac_mii_mode_sel(int mode_sel) val |= (1 <<8 );writel (val, &davinci_syscfg_regs->cfgchip3); } -#endif +/* * If there is no MAC address in the environment, then it will be initialized * (silently) from the value in the EEPROM.
@@ -106,7 +105,6 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr) }#endif /* CONFIG_DRIVER_TI_EMAC */ -#if defined(CONFIG_SOC_DA8XX )void irq_init (void ) {/*
@@ -135,4 +133,3 @@ int da8xx_configure_lpsc_items(const struct lpsc_resource *item,return 0 ; } -#endif
arch/arm/mach-davinci/psc.c +0 -76
99 lines not on this page · raw message
arch/arm/mach-davinci/spl.c +0 -5
@@ -33,12 +33,7 @@ void putc(char c)void spl_board_init (void ) { -#ifdef CONFIG_SOC_DM365 -dm36x_lowlevel_init (0 ); -#endif -#ifdef CONFIG_SOC_DA8XX arch_cpu_init (); -#endif preloader_console_init (); }
Signature · 1 line
2.21.0
PATCH 4/5 usb: musb_hcd: remove unnecessary ifdefs for dm* SoCs
In reply to Bartosz GolaszewskiQuoted 6 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
The support for DaVinci DM* SoCs has been dropped. The ifdefs in the
musb_hcddriver are no longer needed. Remove them.Signed-off-by Bartosz Golaszewski <[email protected]>
Fine by me, feel free to take it via the TI tree.
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/5 net: davinci_emac: drop support for unused PHYs
In reply to Bartosz GolaszewskiQuoted 9 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
The boards with SoCs from the DaVinci DM* family used to come with different PHYs that needed special support implemented in mach-davinci.
Since the support for these chips has long been removed, we can now drop this unnused code from the emac driver.
Signed-off-by Bartosz Golaszewski <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190504/903277fc/attachment.sig>
PATCH 2/5 arm: davinci: remove dead code for PHYs used by DaVinci DM* boards
In reply to Bartosz GolaszewskiQuoted 7 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
The support for DaVinci DM* boards has been dropped a while ago. The code for all those PHYs is no longer used and they have their own proper PHY drivers in
drivers/net/phyanyway. Remove all dead code.Signed-off-by Bartosz Golaszewski <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190504/ead2c45f/attachment.sig>
PATCH 3/5 nand: davinci: remove dead code for dm644x
In reply to Bartosz GolaszewskiQuoted 6 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
The support for DaVinci DM* SoCs has been dropped. The code that used to be relevant to dm644x is no longer needed. Remove it.
Signed-off-by Bartosz Golaszewski <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190504/f24e6db2/attachment.sig>
PATCH 4/5 usb: musb_hcd: remove unnecessary ifdefs for dm* SoCs
In reply to Bartosz GolaszewskiQuoted 7 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
The support for DaVinci DM* SoCs has been dropped. The ifdefs in the
musb_hcddriver are no longer needed. Remove them.Signed-off-by Bartosz Golaszewski <[email protected]>Acked-by Marek Vasut <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190504/9c0d8f82/attachment.sig>
PATCH 5/5 arm: davinci: remove leftover code for dm* SoCs
In reply to Bartosz GolaszewskiQuoted 7 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
The support for DaVinci DM* SoCs has been dropped a while ago. There's still a lot of leftover code in mach-davinci though. Entirely remove certain files and modify the common code to no longer reference unsupported chips.
Quoted 5 lines
Note: all DaVinci platforms supported in u-boot now define
SOC_DA8XXbut not all defineSOC_DA850(e.g. omapl138). We can safely remove all ifdefs for the former, but let's leave the ones for the latter.Signed-off-by Bartosz Golaszewski <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190504/04da173c/attachment.sig>
cover arm: remove leftover code for dm* SoCs
In reply to Bartosz GolaszewskiQuoted 45 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
Commit
6761946fb716("arm: Remove unmaintained davinci boards") removed support for certain DaVinci platforms. We still want to support the da850 chips though and I'm currently working on converting all remaining drivers to using the driver model (please don't remove it yet :)).This series is the first step: let's remove all leftover dead code. This will make things easier when adding support for driver model to NAND and EMAC drivers.
Bartosz Golaszewski (5):
net:davinci_emac: drop support for unused PHYs
arm: davinci: remove dead code for PHYs used by DaVinci DM* boards
nand: davinci: remove dead code for dm644x
usb:musb_hcd: remove unnecessary ifdefs for dm* SoCs
arm: davinci: remove leftover code for dm* SoCsarch/arm/mach-davinci/Makefile | 1 - arch/arm/mach-davinci/cpu.c | 116 ----- arch/arm/mach-davinci/dm355.c | 29 -- arch/arm/mach-davinci/dm365.c | 19 - arch/arm/mach-davinci/dm365_lowlevel.c | 459 ------------------ arch/arm/mach-davinci/dm644x.c | 80 --- arch/arm/mach-davinci/dm646x.c | 25 - arch/arm/mach-davinci/dp83848.c | 127 ----- arch/arm/mach-davinci/et1011c.c | 41 -- .../mach-davinci/include/mach/davinci_misc.h | 4 +- .../arm/mach-davinci/include/mach/emac_defs.h | 56 --- arch/arm/mach-davinci/include/mach/gpio.h | 14 +- arch/arm/mach-davinci/include/mach/hardware.h | 216 --------- arch/arm/mach-davinci/include/mach/i2c_defs.h | 4 - .../mach-davinci/include/mach/syscfg_defs.h | 49 -- arch/arm/mach-davinci/ksz8873.c | 52 -- arch/arm/mach-davinci/lxt972.c | 112 ----- arch/arm/mach-davinci/misc.c | 5 +- arch/arm/mach-davinci/psc.c | 76 --- arch/arm/mach-davinci/spl.c | 5 - drivers/mtd/nand/raw/davinci_nand.c | 39 -- drivers/net/ti/davinci_emac.c | 55 +-- drivers/usb/musb/musb_hcd.c | 6 - 23 files changed, 9 insertions(+), 1581 deletions(-) delete mode 100644 arch/arm/mach-davinci/dm355.c delete mode 100644 arch/arm/mach-davinci/dm365.c
Quoted 8 lines
delete mode 100644 arch/arm/mach-davinci/dm365_lowlevel.c delete mode 100644 arch/arm/mach-davinci/dm644x.c delete mode 100644 arch/arm/mach-davinci/dm646x.c delete mode 100644 arch/arm/mach-davinci/dp83848.c delete mode 100644 arch/arm/mach-davinci/et1011c.c delete mode 100644 arch/arm/mach-davinci/include/mach/syscfg_defs.h delete mode 100644 arch/arm/mach-davinci/ksz8873.c delete mode 100644 arch/arm/mach-davinci/lxt972.c
What about the references to CONFIG_SOC_DM644X inside lowlevel_init.S?
I am not even sure anyone calls this.
Quoted 4 lines
--
2.21.0
cover arm: remove leftover code for dm* SoCs
pon., 20 maj 2019 o 17:39 Adam Ford <[email protected]> napisał(a):
Quoted 56 lines · Bartosz Golaszewski
Quoted 45 lines
From: Bartosz Golaszewski <[email protected]>
Commit
6761946fb716("arm: Remove unmaintained davinci boards") removed support for certain DaVinci platforms. We still want to support the da850 chips though and I'm currently working on converting all remaining drivers to using the driver model (please don't remove it yet :)).This series is the first step: let's remove all leftover dead code. This will make things easier when adding support for driver model to NAND and EMAC drivers.
Bartosz Golaszewski (5):
net:davinci_emac: drop support for unused PHYs
arm: davinci: remove dead code for PHYs used by DaVinci DM* boards
nand: davinci: remove dead code for dm644x
usb:musb_hcd: remove unnecessary ifdefs for dm* SoCs
arm: davinci: remove leftover code for dm* SoCsarch/arm/mach-davinci/Makefile | 1 - arch/arm/mach-davinci/cpu.c | 116 ----- arch/arm/mach-davinci/dm355.c | 29 -- arch/arm/mach-davinci/dm365.c | 19 - arch/arm/mach-davinci/dm365_lowlevel.c | 459 ------------------ arch/arm/mach-davinci/dm644x.c | 80 --- arch/arm/mach-davinci/dm646x.c | 25 - arch/arm/mach-davinci/dp83848.c | 127 ----- arch/arm/mach-davinci/et1011c.c | 41 -- .../mach-davinci/include/mach/davinci_misc.h | 4 +- .../arm/mach-davinci/include/mach/emac_defs.h | 56 --- arch/arm/mach-davinci/include/mach/gpio.h | 14 +- arch/arm/mach-davinci/include/mach/hardware.h | 216 --------- arch/arm/mach-davinci/include/mach/i2c_defs.h | 4 - .../mach-davinci/include/mach/syscfg_defs.h | 49 -- arch/arm/mach-davinci/ksz8873.c | 52 -- arch/arm/mach-davinci/lxt972.c | 112 ----- arch/arm/mach-davinci/misc.c | 5 +- arch/arm/mach-davinci/psc.c | 76 --- arch/arm/mach-davinci/spl.c | 5 - drivers/mtd/nand/raw/davinci_nand.c | 39 -- drivers/net/ti/davinci_emac.c | 55 +-- drivers/usb/musb/musb_hcd.c | 6 - 23 files changed, 9 insertions(+), 1581 deletions(-) delete mode 100644 arch/arm/mach-davinci/dm355.c delete mode 100644 arch/arm/mach-davinci/dm365.cQuoted 8 lines
delete mode 100644 arch/arm/mach-davinci/dm365_lowlevel.c delete mode 100644 arch/arm/mach-davinci/dm644x.c delete mode 100644 arch/arm/mach-davinci/dm646x.c delete mode 100644 arch/arm/mach-davinci/dp83848.c delete mode 100644 arch/arm/mach-davinci/et1011c.c delete mode 100644 arch/arm/mach-davinci/include/mach/syscfg_defs.h delete mode 100644 arch/arm/mach-davinci/ksz8873.c delete mode 100644 arch/arm/mach-davinci/lxt972.c
Quoted 7 lines
What about the references to
CONFIG_SOC_DM644Xinsidelowlevel_init.S?I am not even sure anyone calls this.
Quoted 4 lines
--
2.21.0
Right, seems like nobody uses it anymore. I'll send a follow-up.
Bart