isa.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * linux/arch/arm/kernel/isa.c
  3. *
  4. * Copyright (C) 1999 Phil Blundell
  5. *
  6. * ISA shared memory and I/O port support
  7. */
  8. /*
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version
  12. * 2 of the License, or (at your option) any later version.
  13. */
  14. /*
  15. * Nothing about this is actually ARM specific. One day we could move
  16. * it into kernel/resource.c or some place like that.
  17. */
  18. #include <linux/stddef.h>
  19. #include <linux/types.h>
  20. #include <linux/fs.h>
  21. #include <linux/sysctl.h>
  22. #include <linux/init.h>
  23. static unsigned int isa_membase, isa_portbase, isa_portshift;
  24. static ctl_table ctl_isa_vars[4] = {
  25. {BUS_ISA_MEM_BASE, "membase", &isa_membase,
  26. sizeof(isa_membase), 0444, NULL, &proc_dointvec},
  27. {BUS_ISA_PORT_BASE, "portbase", &isa_portbase,
  28. sizeof(isa_portbase), 0444, NULL, &proc_dointvec},
  29. {BUS_ISA_PORT_SHIFT, "portshift", &isa_portshift,
  30. sizeof(isa_portshift), 0444, NULL, &proc_dointvec},
  31. {0}
  32. };
  33. static struct ctl_table_header *isa_sysctl_header;
  34. static ctl_table ctl_isa[2] = {{CTL_BUS_ISA, "isa", NULL, 0, 0555, ctl_isa_vars},
  35. {0}};
  36. static ctl_table ctl_bus[2] = {{CTL_BUS, "bus", NULL, 0, 0555, ctl_isa},
  37. {0}};
  38. void __init
  39. register_isa_ports(unsigned int membase, unsigned int portbase, unsigned int portshift)
  40. {
  41. isa_membase = membase;
  42. isa_portbase = portbase;
  43. isa_portshift = portshift;
  44. isa_sysctl_header = register_sysctl_table(ctl_bus, 0);
  45. }