Messages in this thread | | | Date | Thu, 10 Jan 2013 15:54:15 +0000 | From | Alan Cox <> | Subject | Re: [PATCH 02/10] goldfish: add the goldfish virtual bus |
| |
> Maybe drivers/bus would be more appropriate though. Every platform > handles platforms differently, and x86 seems to be the only one that > likes the model of putting stuff under drivers/platform.
I'm fine with that and I agree - it is a bus.
> __devinit/__devexit are going away, so you can skip adding them > for new code.
I'll strip those out of the upstream version
> > +module_init(goldfish_pdev_bus_init); > > +module_exit(goldfish_pdev_bus_exit); > > The module_platform_driver() macro takes care of this.
Will change to that.
> > > +static struct resource goldfish_pdev_bus_resources[] = { > > + { > > + .start = GOLDFISH_PDEV_BUS_BASE, > > + .end = GOLDFISH_PDEV_BUS_BASE + > > GOLDFISH_PDEV_BUS_END - 1, > > + .flags = IORESOURCE_IO, > > + }, > > + { > > + .start = GOLDFISH_PDEV_BUS_IRQ, > > + .end = GOLDFISH_PDEV_BUS_IRQ, > > + .flags = IORESOURCE_IRQ, > > + } > > +}; > > + > > +struct platform_device goldfish_pdev_bus_device = { > > + .name = "goldfish_pdev_bus", > > + .id = -1, > > + .num_resources = ARRAY_SIZE(goldfish_pdev_bus_resources), > > + .resource = goldfish_pdev_bus_resources > > +}; > > + > > +static int __init goldfish_init(void) > > +{ > > + return platform_device_register(&goldfish_pdev_bus_device); > > +} > > +device_initcall(goldfish_init); > > This is the part that I think should actually be part of the > architecture tree.
Thinking about it a bit I agree. We still end up needing an architectural header for early console and the like eventually but it does eliminate much of the rest.
I'll rework it that way.
Alan
| |