[coreboot] Resource allocation
Myles Watson
mylesgw at gmail.com
Tue Nov 11 23:24:02 CET 2008
On Tue, Nov 11, 2008 at 3:08 PM, Myles Watson <mylesgw at gmail.com> wrote:
> > > > resources.
> > > > For example:
> > > > > PNP 2e.0: size 8 align 3 gran 3 limit 7ff flags 100 index 60
> > > > which is the floppy device has this resource definition
> > > > { &w83627hf_ops, W83627HF_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, {
> > > > 0x07f8, 0}, },
> > > > and this dts entry
> > > > /* Floppy */
> > > > floppydev = "0x0";
> > > > floppyenable = "0";
> > > > floppyio = "0x3f0";
> > > > floppyirq = "0x60";
> > > > floppydrq = "0x02";
> > >
> > > So you're saying it should be a fixed resource size 8 base 0x3f0?
> >
> > Yes, if it were enabled. I don't know what the device code does if it is
> > disabled.
>
> Good point. I looked, and this doesn't ever get checked. All these
> devices
> show up as dynamic devices and lose this information. I guess some phase3
> scan function needs to be implemented that takes this into account.
>
> Thanks,
> Myles
static void phase3_chip_setup_dev(struct device *dev)
{
- pnp_enable_devices(dev, &w83627hf_ops, ARRAY_SIZE(pnp_dev_info),
pnp_dev_info);
+ struct superio_winbond_w83627hf_dts_config *conf;
+ conf = dev->device_configuration;
+
+ if (conf->com1enable)
+ pnp_enable_devices(dev, &w83627hf_ops, 1, &pnp_dev_info[2]);
+ if (conf->com2enable)
+ pnp_enable_devices(dev, &w83627hf_ops, 1, &pnp_dev_info[3]);
+ if (conf->kbenable)
+ pnp_enable_devices(dev, &w83627hf_ops, 1, &pnp_dev_info[4]);
+ if (conf->hwmenable)
+ pnp_enable_devices(dev, &w83627hf_ops, 1, &pnp_dev_info[9]);
}
Are we thinking something like this? Something different? I don't
understand how we were hoping those dts values would make it into devices.
Thanks,
Myles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20081111/32f5cf2b/attachment.html>
More information about the coreboot
mailing list