From mboxrd@z Thu Jan 1 00:00:00 1970 From: Abel Vesa Date: Wed, 30 Jan 2019 08:19:49 +0000 Subject: [U-Boot] [PATCH v2 17/22] board: mx6sabreauto: Remove the non-DM code In-Reply-To: References: <1548761421-8267-1-git-send-email-abel.vesa@nxp.com> <1548761705-10975-1-git-send-email-abel.vesa@nxp.com> <1548761705-10975-8-git-send-email-abel.vesa@nxp.com> Message-ID: <20190130081947.wcybczsvpocxtjdy@fsr-ub1664-175> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de On 19-01-29 13:43:49, Peng Fan wrote: > > > > -----Original Message----- > > From: Abel Vesa > > Sent: 2019年1月29日 19:35 > > To: Tom Rini ; Fabio Estevam > > ; u-boot at lists.denx.de; dl-uboot-imx > > ; Peng Fan > > Cc: Nitin Garg ; Abel Vesa > > Subject: [PATCH v2 17/22] board: mx6sabreauto: Remove the non-DM code > > > > Since the mx6sabreauto has DM support, remove the unused non-DM code > > from mx6sabreauto board file. > > Has DM_PCA953X been enabled? > No. Why? > Regards, > Peng. > > > > > Signed-off-by: Abel Vesa > > --- > > board/freescale/mx6sabreauto/mx6sabreauto.c | 70 > > ----------------------------- > > 1 file changed, 70 deletions(-) > > > > diff --git a/board/freescale/mx6sabreauto/mx6sabreauto.c > > b/board/freescale/mx6sabreauto/mx6sabreauto.c > > index c7e3e67..dd72de9 100644 > > --- a/board/freescale/mx6sabreauto/mx6sabreauto.c > > +++ b/board/freescale/mx6sabreauto/mx6sabreauto.c > > @@ -159,44 +159,6 @@ static iomux_v3_cfg_t const port_exp[] = { > > IOMUX_PADS(PAD_SD2_DAT0__GPIO1_IO15 | > > MUX_PAD_CTRL(NO_PAD_CTRL)), > > }; > > > > -/*Define for building port exp gpio, pin starts from 0*/ -#define > > PORTEXP_IO_NR(chip, pin) \ > > - ((chip << 5) + pin) > > - > > -/*Get the chip addr from a ioexp gpio*/ -#define > > PORTEXP_IO_TO_CHIP(gpio_nr) \ > > - (gpio_nr >> 5) > > - > > -/*Get the pin number from a ioexp gpio*/ -#define > > PORTEXP_IO_TO_PIN(gpio_nr) \ > > - (gpio_nr & 0x1f) > > - > > -static int port_exp_direction_output(unsigned gpio, int value) -{ > > - int ret; > > - > > - i2c_set_bus_num(2); > > - ret = i2c_probe(PORTEXP_IO_TO_CHIP(gpio)); > > - if (ret) > > - return ret; > > - > > - ret = pca953x_set_dir(PORTEXP_IO_TO_CHIP(gpio), > > - (1 << PORTEXP_IO_TO_PIN(gpio)), > > - (PCA953X_DIR_OUT << PORTEXP_IO_TO_PIN(gpio))); > > - > > - if (ret) > > - return ret; > > - > > - ret = pca953x_set_val(PORTEXP_IO_TO_CHIP(gpio), > > - (1 << PORTEXP_IO_TO_PIN(gpio)), > > - (value << PORTEXP_IO_TO_PIN(gpio))); > > - > > - if (ret) > > - return ret; > > - > > - return 0; > > -} > > - > > #ifdef CONFIG_MTD_NOR_FLASH > > static iomux_v3_cfg_t const eimnor_pads[] = { > > IOMUX_PADS(PAD_EIM_D16__EIM_DATA16 | > > MUX_PAD_CTRL(WEIM_NOR_PAD_CTRL)), > > @@ -681,19 +643,10 @@ int checkboard(void) } > > > > #ifdef CONFIG_USB_EHCI_MX6 > > -#define USB_HOST1_PWR PORTEXP_IO_NR(0x32, 7) > > -#define USB_OTG_PWR PORTEXP_IO_NR(0x34, 1) > > - > > -iomux_v3_cfg_t const usb_otg_pads[] = { > > - IOMUX_PADS(PAD_ENET_RX_ER__USB_OTG_ID | > > MUX_PAD_CTRL(NO_PAD_CTRL)), > > -}; > > - > > int board_ehci_hcd_init(int port) > > { > > switch (port) { > > case 0: > > - SETUP_IOMUX_PADS(usb_otg_pads); > > - > > /* > > * Set daisy chain for otg_pin_id on 6q. > > * For 6dl, this bit is reserved. > > @@ -708,29 +661,6 @@ int board_ehci_hcd_init(int port) > > } > > return 0; > > } > > - > > -int board_ehci_power(int port, int on) > > -{ > > - switch (port) { > > - case 0: > > - if (on) > > - port_exp_direction_output(USB_OTG_PWR, 1); > > - else > > - port_exp_direction_output(USB_OTG_PWR, 0); > > - break; > > - case 1: > > - if (on) > > - port_exp_direction_output(USB_HOST1_PWR, 1); > > - else > > - port_exp_direction_output(USB_HOST1_PWR, 0); > > - break; > > - default: > > - printf("MXC USB port %d not yet supported\n", port); > > - return -EINVAL; > > - } > > - > > - return 0; > > -} > > #endif > > > > #ifdef CONFIG_SPL_BUILD > > -- > > 2.7.4 >