Messages in this thread | | | From | Måns Rullgård <> | Subject | Re: [RFC PATCH v2] irqchip: Add support for Tango interrupt controller | Date | Mon, 18 Jan 2016 13:04:08 +0000 |
| |
Marc Gonzalez <marc_gonzalez@sigmadesigns.com> writes:
> + if (of_property_read_u32(node, "reg", &ctl)) > + panic("%s: failed to get reg base", node->name); > + > + chip = kzalloc(sizeof(*chip), GFP_KERNEL); > + chip->ctl = ctl; > + chip->base = base;
I think it might be better to let the OF core convert the "reg" property to a struct resource, then get the offset by subtracting from the base (physical) address. Otherwise it will break badly if someone thinks it's safe to drop "ranges" from the outer node and use absolute addresses in the child nodes (that's how the "reg" property typically behaves).
Anyway, thanks for revisiting this. I never got a straight answer (or any answer for that matter) when I asked which approach would be preferred, and then I had better things to do than keep trying patches until people got happy.
-- Måns Rullgård
| |