14 #include <linux/kernel.h>
15 #include <linux/types.h>
20 #include <linux/i2c.h>
36 #include <mach/devices.h>
53 .platform_data = &acs5k_i2c_device_platdata,
61 static int acs5k_gpio_value[] = {
62 -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, -1, 0, 1, 0, -1, -1
66 for (n = 0; n <
ARRAY_SIZE(acs5k_gpio_value); ++
n) {
68 if (acs5k_gpio_value[n] < 0)
73 gpio_export(gpio_base + n, 0);
82 .setup = acs5k_pca9555_setup,
91 .platform_data = &acs5k_i2c_pca9555_platdata,
95 static void __devinit acs5k_i2c_init(
void)
106 .name =
"Boot Agent and config",
136 .parts = acs5k_nor_partitions,
139 static struct resource acs5k_nor_resource[] = {
155 .name =
"physmap-flash",
157 .num_resources =
ARRAY_SIZE(acs5k_nor_resource),
158 .resource = acs5k_nor_resource,
160 .platform_data = &acs5k_nor_pdata,
164 static void __init acs5k_register_nor(
void)
168 if (acs5k_nor_partitions[0].mask_flags == 0)
169 printk(
KERN_WARNING "Warning: Unprotecting bootloader and configuration partition\n");
176 static int __init acs5k_protection_setup(
char *
s)
188 __setup(
"protect_bootloader=", acs5k_protection_setup);
190 static void __init acs5k_init_gpio(
void)
195 for (i = 0; i < 4; ++
i)
198 for (i = 8; i < 16; ++
i)
209 static void __init acs5k_init(
void)
218 acs5k_register_nor();
224 MACHINE_START(ACS5K,
"Brivo Systems LLC ACS-5000 Master board")
226 .atag_offset = 0x100,
229 .init_machine = acs5k_init,