-#define COLLIE_SCP_INIT_DATA(adr,dat) (((adr)<<16)|(dat))
-#define COLLIE_SCP_INIT_DATA_END ((unsigned long)-1)
- static const unsigned long scp_init[] = {
- COLLIE_SCP_INIT_DATA(COLLIE_SCP_MCR, 0x0140), // 00
- COLLIE_SCP_INIT_DATA(COLLIE_SCP_MCR, 0x0100),
- COLLIE_SCP_INIT_DATA(COLLIE_SCP_CDR, 0x0000), // 04
- COLLIE_SCP_INIT_DATA(COLLIE_SCP_CPR, 0x0000), // 0C
- COLLIE_SCP_INIT_DATA(COLLIE_SCP_CCR, 0x0000), // 10
- COLLIE_SCP_INIT_DATA(COLLIE_SCP_IMR, 0x0000), // 18
- COLLIE_SCP_INIT_DATA(COLLIE_SCP_IRM, 0x00FF), // 14
- COLLIE_SCP_INIT_DATA(COLLIE_SCP_ISR, 0x0000), // 1C
- COLLIE_SCP_INIT_DATA(COLLIE_SCP_IRM, 0x0000),
- COLLIE_SCP_INIT_DATA(COLLIE_SCP_GPCR, COLLIE_SCP_IO_DIR), // 20
- COLLIE_SCP_INIT_DATA(COLLIE_SCP_GPWR, COLLIE_SCP_IO_OUT), // 24
- COLLIE_SCP_INIT_DATA_END
- };
- int i;
- for (i = 0; scp_init[i] != COLLIE_SCP_INIT_DATA_END; i++) {
- int adr = scp_init[i] >> 16;
- COLLIE_SCP_REG(adr) = scp_init[i] & 0xFFFF;
- }
+static struct scoop_config collie_scoop_setup = {
+ .io_dir = COLLIE_SCOOP_IO_DIR,
+ .io_out = COLLIE_SCOOP_IO_OUT,
+};
+
+static struct platform_device colliescoop_device = {
+ .name = "sharp-scoop",
+ .id = -1,
+ .dev = {
+ .platform_data = &collie_scoop_setup,
+ },
+ .num_resources = ARRAY_SIZE(collie_scoop_resources),
+ .resource = collie_scoop_resources,
+};