[coreboot] Resource allocation

Myles Watson mylesgw at gmail.com
Fri Nov 14 21:35:05 CET 2008


On Fri, Nov 14, 2008 at 9:58 AM, Myles Watson <mylesgw at gmail.com> wrote:

>
>
> On Fri, Nov 14, 2008 at 9:55 AM, ron minnich <rminnich at gmail.com> wrote:
>
>> On Fri, Nov 14, 2008 at 8:50 AM, Myles Watson <mylesgw at gmail.com> wrote:
>>
>> > If we're going that way, I'd rather just use what we have and change the
>> PNP
>> > code to match. (Let it create dynamic devices but pass more information
>> in
>> > the info structure so that the enables get set, etc.)  The hierarchy
>> buys us
>> > nothing if we just make lots of little files and types.
>>
>> I think this makes the most sense.
>>
>
> I'll implement this one and send a patch. I don't like it being labeled
> dynamic, but I will live (or else I'll change it.)
>

I changed it so that the names look like this:
 ioport_2e(IOPORT: 2e): enabled 1 have_resources 0 devfn ff
  ioport_2e_pnp_child_0(PNP: 002e.0): enabled 0 have_resources 0 devfn 0
  ioport_2e_pnp_child_0(PNP: 002e.1): enabled 0 have_resources 0 devfn 1
  ioport_2e_pnp_child_0(PNP: 002e.2): enabled 1 have_resources 0 devfn 2
  ioport_2e_pnp_child_0(PNP: 002e.3): enabled 0 have_resources 0 devfn 3
  ioport_2e_pnp_child_0(PNP: 002e.5): enabled 1 have_resources 0 devfn 5
  ioport_2e_pnp_child_0(PNP: 002e.6): enabled 0 have_resources 0 devfn 6
  ioport_2e_pnp_child_0(PNP: 002e.7): enabled 0 have_resources 0 devfn 7
  ioport_2e_pnp_child_0(PNP: 002e.8): enabled 0 have_resources 0 devfn 8
  ioport_2e_pnp_child_0(PNP: 002e.9): enabled 0 have_resources 0 devfn 9
  ioport_2e_pnp_child_0(PNP: 002e.a): enabled 0 have_resources 0 devfn a
  ioport_2e_pnp_child_0(PNP: 002e.b): enabled 1 have_resources 0 devfn b


This patch changes PNP support for devices so that the dts values get passed
in.  Build and run-tested only on Serengeti.  It will probably require the
rework of other SuperIOs.

include/device/pnp.h:
    Add enable, val, and irq & drq structs.

superio/winbond/w83627hf/superio.c:
    Change functions to operate on children.
    Add device ID to ops.
    Add enables to pnp_dev_info table.
    Fill in dts values.

superio/winbond/w83627hf/dts:
    Get rid of device number parameters.
    Add config parameters so we know when they're set.

device/pnp_device.c:
    Allocate devices as children to SuperIO.


device/pnp_device.c:
    Allocate devices as children to SuperIO.

mainboard/amd/serengeti/dts:
    Move ioport so it's found. (Not its permanent resting place I hope.)
    Add enables for KBC, SP1, and HWM to show it off.

Signed-off-by: Myles Watson <mylesgw at gmail.com>

Thanks,
Myles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20081114/d784aa56/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pnp.diff
Type: text/x-patch
Size: 13514 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20081114/d784aa56/attachment.diff>


More information about the coreboot mailing list