setup.c 981 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * linux/arch/sh/boards/hp6xx/hp680/setup.c
  3. *
  4. * Copyright (C) 2002 Andriy Skulysh
  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 HP680 (internal peripherials only)
  10. */
  11. #include <linux/config.h>
  12. #include <linux/init.h>
  13. #include <asm/hd64461/hd64461.h>
  14. #include <asm/io.h>
  15. #include <asm/hp6xx/hp6xx.h>
  16. #include <asm/cpu/dac.h>
  17. const char *get_system_type(void)
  18. {
  19. return "HP680";
  20. }
  21. int __init platform_setup(void)
  22. {
  23. u16 v;
  24. v = inw(HD64461_STBCR);
  25. v |= HD64461_STBCR_SURTST | HD64461_STBCR_SIRST |
  26. HD64461_STBCR_STM1ST | HD64461_STBCR_STM0ST |
  27. HD64461_STBCR_SAFEST | HD64461_STBCR_SPC0ST |
  28. HD64461_STBCR_SMIAST | HD64461_STBCR_SAFECKE_OST |
  29. HD64461_STBCR_SAFECKE_IST;
  30. outw(v, HD64461_STBCR);
  31. v = inw(HD64461_GPADR);
  32. v |= HD64461_GPADR_SPEAKER | HD64461_GPADR_PCMCIA0;
  33. outw(v, HD64461_GPADR);
  34. sh_dac_disable(DAC_SPEAKER_VOLUME);
  35. return 0;
  36. }