[parisc-linux-cvs] Add some io regions to /proc/iomem
Ryan Bradetich
rbradetich@uswest.net
11 Dec 2001 21:12:04 -0700
--=-ExYcWhSVG2FpTFqJKIEr
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
* Adds the Central Bus, Local Broadcast, and Global Broadcast
regions to the /proc/iomem.
* Bumps kernel version to 2.4.16-pa19
- Ryan
--=-ExYcWhSVG2FpTFqJKIEr
Content-Disposition: attachment; filename=mmio_region.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1
Index: arch/parisc/kernel/setup.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/linux/arch/parisc/kernel/setup.c,v
retrieving revision 1.97
diff -u -p -r1.97 setup.c
--- arch/parisc/kernel/setup.c 2001/11/29 15:49:18 1.97
+++ arch/parisc/kernel/setup.c 2001/12/12 04:09:24
@@ -211,6 +211,58 @@ static void parisc_proc_mkdir(void)
}
}
=20
+static struct resource central_bus =3D {
+ name: "Central Bus",
+ start: (unsigned long)0xfffffffffff80000,
+ end: (unsigned long)0xfffffffffffaffff,
+ flags: IORESOURCE_MEM,
+};
+
+static struct resource local_broadcast =3D {
+ name: "Local Broadcast",
+ start: (unsigned long)0xfffffffffffb0000,
+ end: (unsigned long)0xfffffffffffdffff,
+ flags: IORESOURCE_MEM,
+};
+
+static struct resource global_broadcast =3D {
+ name: "Global Broadcast",
+ start: (unsigned long)0xfffffffffffe0000,
+ end: (unsigned long)0xffffffffffffffff,
+ flags: IORESOURCE_MEM,
+};
+
+int __init parisc_init_resources(void)
+{
+ int result;
+
+ result =3D request_resource(&iomem_resource, ¢ral_bus);
+ if (result < 0) {
+ printk(KERN_ERR=20
+ "%s: failed to claim %s address space!\n",=20
+ __FILE__, central_bus.name);
+ return result;
+ }
+
+ result =3D request_resource(&iomem_resource, &local_broadcast);
+ if (result < 0) {
+ printk(KERN_ERR=20
+ "%s: failed to claim %saddress space!\n",=20
+ __FILE__, local_broadcast.name);
+ return result;
+ }
+
+ result =3D request_resource(&iomem_resource, &global_broadcast);
+ if (result < 0) {
+ printk(KERN_ERR=20
+ "%s: failed to claim %s address space!\n",=20
+ __FILE__, global_broadcast.name);
+ return result;
+ }
+
+ return 0;
+}
+
extern void gsc_init(void);
extern void processor_init(void);
extern void ccio_init(void);
@@ -223,6 +275,7 @@ extern void eisa_init(void);
void __init parisc_init(void)
{
parisc_proc_mkdir();
+ parisc_init_resources();
do_device_inventory(); /* probe for hardware */
=20
processor_init();
--=-ExYcWhSVG2FpTFqJKIEr--