2 * Infineon Reference Boards
4 * Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
14 #ifdef CONFIG_MTD_PARTITIONS
15 static struct mtd_partition easy_partitions
[] = {
20 .mask_flags
= MTD_WRITEABLE
,
23 .offset
= MTDPART_OFS_APPEND
,
27 .offset
= MTDPART_OFS_APPEND
,
28 .size
= MTDPART_SIZ_FULL
,
31 #endif /* CONFIG_MTD_PARTITIONS */
33 static void switch_bank_gpio3(unsigned bank
)
37 gpio_set_value(ADM5120_GPIO_PIN3
, 0);
40 gpio_set_value(ADM5120_GPIO_PIN3
, 1);
45 void __init
easy_setup_pqfp(void)
47 /* setup flash A20 line */
48 gpio_request(ADM5120_GPIO_PIN3
, NULL
);
49 gpio_direction_output(ADM5120_GPIO_PIN3
, 0);
50 adm5120_flash0_data
.switch_bank
= switch_bank_gpio3
;
52 #ifdef CONFIG_MTD_PARTITIONS
53 adm5120_flash0_data
.nr_parts
= ARRAY_SIZE(easy_partitions
);
54 adm5120_flash0_data
.parts
= easy_partitions
;
55 #endif /* CONFIG_MTD_PARTITIONS */
57 adm5120_add_device_flash(0);
60 static void switch_bank_gpio5(unsigned bank
)
64 gpio_set_value(ADM5120_GPIO_PIN5
, 0);
67 gpio_set_value(ADM5120_GPIO_PIN5
, 1);
72 void __init
easy_setup_bga(void)
74 /* setup flash A20 line */
75 gpio_request(ADM5120_GPIO_PIN5
, NULL
);
76 gpio_direction_output(ADM5120_GPIO_PIN5
, 0);
77 adm5120_flash0_data
.switch_bank
= switch_bank_gpio5
;
79 #ifdef CONFIG_MTD_PARTITIONS
80 adm5120_flash0_data
.nr_parts
= ARRAY_SIZE(easy_partitions
);
81 adm5120_flash0_data
.parts
= easy_partitions
;
82 #endif /* CONFIG_MTD_PARTITIONS */
84 adm5120_add_device_flash(0);