aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-06-25 06:41:36 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-06-30 09:33:44 -0400
commitc721e0cb9da58d63dc880e188a95b8eead84cc81 (patch)
tree4378fd25dfff17b12548e60201ca1059c54ce990 /arch
parentc317fc594064b3e6a53502a985b44416a5ef1e91 (diff)
ARM: shmobile: use common extra gpio functions on Mackerel
This patch switch over to use common extra gpio method, and reduced a waste of code on SH-ARM. But these functions should be replaced by correct gpio function in the future. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c34
1 files changed, 4 insertions, 30 deletions
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index b577f7c44678..30d06b5b25d4 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -203,32 +203,6 @@
203 * amixer set "HPOUTR Mixer DACH" on 203 * amixer set "HPOUTR Mixer DACH" on
204 */ 204 */
205 205
206/*
207 * FIXME !!
208 *
209 * gpio_no_direction
210 * gpio_pull_down
211 * are quick_hack.
212 *
213 * current gpio frame work doesn't have
214 * the method to control only pull up/down/free.
215 * this function should be replaced by correct gpio function
216 */
217static void __init gpio_no_direction(u32 addr)
218{
219 __raw_writeb(0x00, addr);
220}
221
222static void __init gpio_pull_down(u32 addr)
223{
224 u8 data = __raw_readb(addr);
225
226 data &= 0x0F;
227 data |= 0xA0;
228
229 __raw_writeb(data, addr);
230}
231
232/* MTD */ 206/* MTD */
233static struct mtd_partition nor_flash_partitions[] = { 207static struct mtd_partition nor_flash_partitions[] = {
234 { 208 {
@@ -1458,11 +1432,11 @@ static void __init mackerel_init(void)
1458 1432
1459 /* USBHS0 */ 1433 /* USBHS0 */
1460 gpio_request(GPIO_FN_VBUS0_0, NULL); 1434 gpio_request(GPIO_FN_VBUS0_0, NULL);
1461 gpio_pull_down(GPIO_PORT168CR); /* VBUS0_0 pull down */ 1435 gpio_request_pulldown(GPIO_PORT168CR); /* VBUS0_0 pull down */
1462 1436
1463 /* USBHS1 */ 1437 /* USBHS1 */
1464 gpio_request(GPIO_FN_VBUS0_1, NULL); 1438 gpio_request(GPIO_FN_VBUS0_1, NULL);
1465 gpio_pull_down(GPIO_PORT167CR); /* VBUS0_1 pull down */ 1439 gpio_request_pulldown(GPIO_PORT167CR); /* VBUS0_1 pull down */
1466 gpio_request(GPIO_FN_IDIN_1_113, NULL); 1440 gpio_request(GPIO_FN_IDIN_1_113, NULL);
1467 1441
1468 /* enable FSI2 port A (ak4643) */ 1442 /* enable FSI2 port A (ak4643) */
@@ -1475,8 +1449,8 @@ static void __init mackerel_init(void)
1475 1449
1476 gpio_request(GPIO_PORT9, NULL); 1450 gpio_request(GPIO_PORT9, NULL);
1477 gpio_request(GPIO_PORT10, NULL); 1451 gpio_request(GPIO_PORT10, NULL);
1478 gpio_no_direction(GPIO_PORT9CR); /* FSIAOBT needs no direction */ 1452 gpio_direction_none(GPIO_PORT9CR); /* FSIAOBT needs no direction */
1479 gpio_no_direction(GPIO_PORT10CR); /* FSIAOLR needs no direction */ 1453 gpio_direction_none(GPIO_PORT10CR); /* FSIAOLR needs no direction */
1480 1454
1481 intc_set_priority(IRQ_FSI, 3); /* irq priority FSI(3) > SMSC911X(2) */ 1455 intc_set_priority(IRQ_FSI, 3); /* irq priority FSI(3) > SMSC911X(2) */
1482 1456