setup.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * linux/arch/sh/board/adx/setup.c
  3. *
  4. * Copyright (C) 2001 A&D Co., Ltd.
  5. *
  6. * I/O routine and setup routines for A&D ADX Board
  7. *
  8. * This file is subject to the terms and conditions of the GNU General Public
  9. * License. See the file "COPYING" in the main directory of this archive
  10. * for more details.
  11. *
  12. */
  13. #include <asm/machvec.h>
  14. #include <linux/module.h>
  15. extern void init_adx_IRQ(void);
  16. extern void *cf_io_base;
  17. const char *get_system_type(void)
  18. {
  19. return "A&D ADX";
  20. }
  21. unsigned long adx_isa_port2addr(unsigned long offset)
  22. {
  23. /* CompactFlash (IDE) */
  24. if (((offset >= 0x1f0) && (offset <= 0x1f7)) || (offset == 0x3f6)) {
  25. return (unsigned long)cf_io_base + offset;
  26. }
  27. /* eth0 */
  28. if ((offset >= 0x300) && (offset <= 0x30f)) {
  29. return 0xa5000000 + offset; /* COMM BOARD (AREA1) */
  30. }
  31. return offset + 0xb0000000; /* IOBUS (AREA 4)*/
  32. }
  33. /*
  34. * The Machine Vector
  35. */
  36. struct sh_machine_vector mv_adx __initmv = {
  37. .mv_nr_irqs = 48,
  38. .mv_isa_port2addr = adx_isa_port2addr,
  39. .mv_init_irq = init_adx_IRQ,
  40. };
  41. ALIAS_MV(adx)
  42. int __init platform_setup(void)
  43. {
  44. /* Nothing to see here .. */
  45. return 0;
  46. }