> -----Original Message----- > From: Abel Vesa > Sent: 2019年1月29日 19:35 > To: Tom Rini <tr...@konsulko.com>; Fabio Estevam > <fabio.este...@nxp.com>; u-boot@lists.denx.de; dl-uboot-imx > <uboot-...@nxp.com>; Peng Fan <peng....@nxp.com> > Cc: Nitin Garg <nitin.g...@nxp.com>; Abel Vesa <abel.v...@nxp.com> > 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? Regards, Peng. > > Signed-off-by: Abel Vesa <abel.v...@nxp.com> > --- > 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 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot