Commit 9e41cbf1334285c68c8094bdb65f850631a226ba
Committed by
Stefano Babic
1 parent
ef4749f085
Exists in
smarc_8mq_lf_v2020.04
and in
12 other branches
board: mx6sabreauto: Remove the non-DM code
Since the mx6sabreauto has DM support, remove the unused non-DM code from mx6sabreauto board file. Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
Showing 1 changed file with 0 additions and 70 deletions Side-by-side Diff
board/freescale/mx6sabreauto/mx6sabreauto.c
... | ... | @@ -159,44 +159,6 @@ |
159 | 159 | IOMUX_PADS(PAD_SD2_DAT0__GPIO1_IO15 | MUX_PAD_CTRL(NO_PAD_CTRL)), |
160 | 160 | }; |
161 | 161 | |
162 | -/*Define for building port exp gpio, pin starts from 0*/ | |
163 | -#define PORTEXP_IO_NR(chip, pin) \ | |
164 | - ((chip << 5) + pin) | |
165 | - | |
166 | -/*Get the chip addr from a ioexp gpio*/ | |
167 | -#define PORTEXP_IO_TO_CHIP(gpio_nr) \ | |
168 | - (gpio_nr >> 5) | |
169 | - | |
170 | -/*Get the pin number from a ioexp gpio*/ | |
171 | -#define PORTEXP_IO_TO_PIN(gpio_nr) \ | |
172 | - (gpio_nr & 0x1f) | |
173 | - | |
174 | -static int port_exp_direction_output(unsigned gpio, int value) | |
175 | -{ | |
176 | - int ret; | |
177 | - | |
178 | - i2c_set_bus_num(2); | |
179 | - ret = i2c_probe(PORTEXP_IO_TO_CHIP(gpio)); | |
180 | - if (ret) | |
181 | - return ret; | |
182 | - | |
183 | - ret = pca953x_set_dir(PORTEXP_IO_TO_CHIP(gpio), | |
184 | - (1 << PORTEXP_IO_TO_PIN(gpio)), | |
185 | - (PCA953X_DIR_OUT << PORTEXP_IO_TO_PIN(gpio))); | |
186 | - | |
187 | - if (ret) | |
188 | - return ret; | |
189 | - | |
190 | - ret = pca953x_set_val(PORTEXP_IO_TO_CHIP(gpio), | |
191 | - (1 << PORTEXP_IO_TO_PIN(gpio)), | |
192 | - (value << PORTEXP_IO_TO_PIN(gpio))); | |
193 | - | |
194 | - if (ret) | |
195 | - return ret; | |
196 | - | |
197 | - return 0; | |
198 | -} | |
199 | - | |
200 | 162 | #ifdef CONFIG_MTD_NOR_FLASH |
201 | 163 | static iomux_v3_cfg_t const eimnor_pads[] = { |
202 | 164 | IOMUX_PADS(PAD_EIM_D16__EIM_DATA16 | MUX_PAD_CTRL(WEIM_NOR_PAD_CTRL)), |
203 | 165 | |
... | ... | @@ -681,19 +643,10 @@ |
681 | 643 | } |
682 | 644 | |
683 | 645 | #ifdef CONFIG_USB_EHCI_MX6 |
684 | -#define USB_HOST1_PWR PORTEXP_IO_NR(0x32, 7) | |
685 | -#define USB_OTG_PWR PORTEXP_IO_NR(0x34, 1) | |
686 | - | |
687 | -iomux_v3_cfg_t const usb_otg_pads[] = { | |
688 | - IOMUX_PADS(PAD_ENET_RX_ER__USB_OTG_ID | MUX_PAD_CTRL(NO_PAD_CTRL)), | |
689 | -}; | |
690 | - | |
691 | 646 | int board_ehci_hcd_init(int port) |
692 | 647 | { |
693 | 648 | switch (port) { |
694 | 649 | case 0: |
695 | - SETUP_IOMUX_PADS(usb_otg_pads); | |
696 | - | |
697 | 650 | /* |
698 | 651 | * Set daisy chain for otg_pin_id on 6q. |
699 | 652 | * For 6dl, this bit is reserved. |
... | ... | @@ -706,29 +659,6 @@ |
706 | 659 | printf("MXC USB port %d not yet supported\n", port); |
707 | 660 | return -EINVAL; |
708 | 661 | } |
709 | - return 0; | |
710 | -} | |
711 | - | |
712 | -int board_ehci_power(int port, int on) | |
713 | -{ | |
714 | - switch (port) { | |
715 | - case 0: | |
716 | - if (on) | |
717 | - port_exp_direction_output(USB_OTG_PWR, 1); | |
718 | - else | |
719 | - port_exp_direction_output(USB_OTG_PWR, 0); | |
720 | - break; | |
721 | - case 1: | |
722 | - if (on) | |
723 | - port_exp_direction_output(USB_HOST1_PWR, 1); | |
724 | - else | |
725 | - port_exp_direction_output(USB_HOST1_PWR, 0); | |
726 | - break; | |
727 | - default: | |
728 | - printf("MXC USB port %d not yet supported\n", port); | |
729 | - return -EINVAL; | |
730 | - } | |
731 | - | |
732 | 662 | return 0; |
733 | 663 | } |
734 | 664 | #endif |