staticint __init db1x_late_setup(void)
{ if (!pm_power_off)
pm_power_off = db1x_power_off; if (!_machine_halt)
_machine_halt = db1x_power_off; if (!_machine_restart)
_machine_restart = db1x_reset;
platform_device_register(&db1x00_rtc_dev);
return 0;
}
device_initcall(db1x_late_setup);
/* register a pcmcia socket */ int __init db1x_register_pcmcia_socket(phys_addr_t pcmcia_attr_start,
phys_addr_t pcmcia_attr_end,
phys_addr_t pcmcia_mem_start,
phys_addr_t pcmcia_mem_end,
phys_addr_t pcmcia_io_start,
phys_addr_t pcmcia_io_end, int card_irq, int cd_irq, int stschg_irq, int eject_irq, int id)
{ int cnt, i, ret; struct resource *sr; struct platform_device *pd;
cnt = 5; if (eject_irq)
cnt++; if (stschg_irq)
cnt++;
sr = kcalloc(cnt, sizeof(struct resource), GFP_KERNEL); if (!sr) return -ENOMEM;
pd = platform_device_alloc("db1xxx_pcmcia", id); if (!pd) {
ret = -ENOMEM; goto out;
}
int __init db1x_register_norflash(unsignedlong size, int width, int swapped)
{ struct physmap_flash_data *pfd; struct platform_device *pd; struct mtd_partition *parts; struct resource *res; int ret, i;
if (size < (8 * 1024 * 1024)) return -EINVAL;
ret = -ENOMEM;
parts = kcalloc(5, sizeof(struct mtd_partition), GFP_KERNEL); if (!parts) goto out;
res = kzalloc(sizeof(struct resource), GFP_KERNEL); if (!res) goto out1;
pfd = kzalloc(sizeof(struct physmap_flash_data), GFP_KERNEL); if (!pfd) goto out2;
pd = platform_device_alloc("physmap-flash", 0); if (!pd) goto out3;
/* NOR flash ends at 0x20000000, regardless of size */
res->start = 0x20000000 - size;
res->end = 0x20000000 - 1;
res->flags = IORESOURCE_MEM;
/* partition setup. Most Develboards have a switch which allows * to swap the physical locations of the 2 NOR flash banks.
*/
i = 0; if (!swapped) { /* first NOR chip */
parts[i].offset = 0;
parts[i].name = "User FS";
parts[i].size = size / 2;
i++;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.