diff options
-rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/sh-gpio.h | 19 |
2 files changed, 9 insertions, 27 deletions
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index d90d2f11071b..207acf0e07da 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/mtd/physmap.h> | 41 | #include <linux/mtd/physmap.h> |
42 | #include <linux/mtd/sh_flctl.h> | 42 | #include <linux/mtd/sh_flctl.h> |
43 | #include <linux/pinctrl/machine.h> | 43 | #include <linux/pinctrl/machine.h> |
44 | #include <linux/pinctrl/pinconf-generic.h> | ||
44 | #include <linux/platform_data/gpio_backlight.h> | 45 | #include <linux/platform_data/gpio_backlight.h> |
45 | #include <linux/pm_clock.h> | 46 | #include <linux/pm_clock.h> |
46 | #include <linux/regulator/fixed.h> | 47 | #include <linux/regulator/fixed.h> |
@@ -1311,6 +1312,10 @@ static struct i2c_board_info i2c1_devices[] = { | |||
1311 | }, | 1312 | }, |
1312 | }; | 1313 | }; |
1313 | 1314 | ||
1315 | static unsigned long pin_pulldown_conf[] = { | ||
1316 | PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 0), | ||
1317 | }; | ||
1318 | |||
1314 | static const struct pinctrl_map mackerel_pinctrl_map[] = { | 1319 | static const struct pinctrl_map mackerel_pinctrl_map[] = { |
1315 | /* ADXL34X */ | 1320 | /* ADXL34X */ |
1316 | PIN_MAP_MUX_GROUP_DEFAULT("1-0053", "pfc-sh7372", | 1321 | PIN_MAP_MUX_GROUP_DEFAULT("1-0053", "pfc-sh7372", |
@@ -1396,17 +1401,19 @@ static const struct pinctrl_map mackerel_pinctrl_map[] = { | |||
1396 | /* USBHS0 */ | 1401 | /* USBHS0 */ |
1397 | PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.0", "pfc-sh7372", | 1402 | PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.0", "pfc-sh7372", |
1398 | "usb0_vbus", "usb0"), | 1403 | "usb0_vbus", "usb0"), |
1404 | PIN_MAP_CONFIGS_GROUP_DEFAULT("renesas_usbhs.0", "pfc-sh7372", | ||
1405 | "usb0_vbus", pin_pulldown_conf), | ||
1399 | /* USBHS1 */ | 1406 | /* USBHS1 */ |
1400 | PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.1", "pfc-sh7372", | 1407 | PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.1", "pfc-sh7372", |
1401 | "usb1_vbus", "usb1"), | 1408 | "usb1_vbus", "usb1"), |
1409 | PIN_MAP_CONFIGS_GROUP_DEFAULT("renesas_usbhs.&", "pfc-sh7372", | ||
1410 | "usb1_vbus", pin_pulldown_conf), | ||
1402 | PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.1", "pfc-sh7372", | 1411 | PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.1", "pfc-sh7372", |
1403 | "usb1_otg_id_0", "usb1"), | 1412 | "usb1_otg_id_0", "usb1"), |
1404 | }; | 1413 | }; |
1405 | 1414 | ||
1406 | #define GPIO_PORT9CR IOMEM(0xE6051009) | 1415 | #define GPIO_PORT9CR IOMEM(0xE6051009) |
1407 | #define GPIO_PORT10CR IOMEM(0xE605100A) | 1416 | #define GPIO_PORT10CR IOMEM(0xE605100A) |
1408 | #define GPIO_PORT167CR IOMEM(0xE60520A7) | ||
1409 | #define GPIO_PORT168CR IOMEM(0xE60520A8) | ||
1410 | #define SRCR4 IOMEM(0xe61580bc) | 1417 | #define SRCR4 IOMEM(0xe61580bc) |
1411 | #define USCCR1 IOMEM(0xE6058144) | 1418 | #define USCCR1 IOMEM(0xE6058144) |
1412 | static void __init mackerel_init(void) | 1419 | static void __init mackerel_init(void) |
@@ -1446,12 +1453,6 @@ static void __init mackerel_init(void) | |||
1446 | 1453 | ||
1447 | gpio_request_one(151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ | 1454 | gpio_request_one(151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ |
1448 | 1455 | ||
1449 | /* USBHS0 */ | ||
1450 | gpio_request_pulldown(GPIO_PORT168CR); /* VBUS0_0 pull down */ | ||
1451 | |||
1452 | /* USBHS1 */ | ||
1453 | gpio_request_pulldown(GPIO_PORT167CR); /* VBUS0_1 pull down */ | ||
1454 | |||
1455 | /* FSI2 port A (ak4643) */ | 1456 | /* FSI2 port A (ak4643) */ |
1456 | gpio_request_one(161, GPIOF_OUT_INIT_LOW, NULL); /* slave */ | 1457 | gpio_request_one(161, GPIOF_OUT_INIT_LOW, NULL); /* slave */ |
1457 | 1458 | ||
diff --git a/arch/arm/mach-shmobile/sh-gpio.h b/arch/arm/mach-shmobile/sh-gpio.h index e834763ac2a5..2c4141413db9 100644 --- a/arch/arm/mach-shmobile/sh-gpio.h +++ b/arch/arm/mach-shmobile/sh-gpio.h | |||
@@ -26,23 +26,4 @@ static inline void __init gpio_direction_none(void __iomem * addr) | |||
26 | __raw_writeb(0x00, addr); | 26 | __raw_writeb(0x00, addr); |
27 | } | 27 | } |
28 | 28 | ||
29 | static inline void __init gpio_request_pullup(void __iomem * addr) | ||
30 | { | ||
31 | u8 data = __raw_readb(addr); | ||
32 | |||
33 | data &= 0x0F; | ||
34 | data |= 0xC0; | ||
35 | __raw_writeb(data, addr); | ||
36 | } | ||
37 | |||
38 | static inline void __init gpio_request_pulldown(void __iomem * addr) | ||
39 | { | ||
40 | u8 data = __raw_readb(addr); | ||
41 | |||
42 | data &= 0x0F; | ||
43 | data |= 0xA0; | ||
44 | |||
45 | __raw_writeb(data, addr); | ||
46 | } | ||
47 | |||
48 | #endif /* __ASM_ARCH_GPIO_H */ | 29 | #endif /* __ASM_ARCH_GPIO_H */ |