setup.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * linux/arch/sh/boards/hp6xx/hp620/setup.c
  3. *
  4. * Copyright (C) 2002 Andriy Skulysh, 2005 Kristoffer Ericson
  5. *
  6. * May be copied or modified under the terms of the GNU General Public
  7. * License. See Linux/COPYING for more information.
  8. *
  9. * Setup code for an HP620.
  10. * Due to similiarity with hp680/hp690 same inits are done (for now)
  11. */
  12. #include <linux/config.h>
  13. #include <linux/init.h>
  14. #include <asm/hd64461/hd64461.h>
  15. #include <asm/io.h>
  16. #include <asm/hp6xx/hp6xx.h>
  17. #include <asm/cpu/dac.h>
  18. const char *get_system_type(void)
  19. {
  20. return "HP620";
  21. }
  22. int __init platform_setup(void)
  23. {
  24. u16 v;
  25. v = inw(HD64461_STBCR);
  26. v |= HD64461_STBCR_SURTST | HD64461_STBCR_SIRST |
  27. HD64461_STBCR_STM1ST | HD64461_STBCR_STM0ST |
  28. HD64461_STBCR_SAFEST | HD64461_STBCR_SPC0ST |
  29. HD64461_STBCR_SMIAST | HD64461_STBCR_SAFECKE_OST |
  30. HD64461_STBCR_SAFECKE_IST;
  31. outw(v, HD64461_STBCR);
  32. v = inw(HD64461_GPADR);
  33. v |= HD64461_GPADR_SPEAKER | HD64461_GPADR_PCMCIA0;
  34. outw(v, HD64461_GPADR);
  35. sh_dac_disable(DAC_SPEAKER_VOLUME);
  36. return 0;
  37. }