setup-fb-24bpp.c 885 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * linux/arch/arm/mach-s5pc100/setup-fb-24bpp.c
  3. *
  4. * Copyright 2009 Samsung Electronics
  5. *
  6. * Base S5PC100 setup information for 24bpp LCD framebuffer
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #include <linux/kernel.h>
  13. #include <linux/types.h>
  14. #include <linux/fb.h>
  15. #include <linux/gpio.h>
  16. #include <mach/map.h>
  17. #include <plat/fb.h>
  18. #include <plat/gpio-cfg.h>
  19. #define DISR_OFFSET 0x7008
  20. static void s5pc100_fb_setgpios(unsigned int base, unsigned int nr)
  21. {
  22. s3c_gpio_cfgrange_nopull(base, nr, S3C_GPIO_SFN(2));
  23. }
  24. void s5pc100_fb_gpio_setup_24bpp(void)
  25. {
  26. s5pc100_fb_setgpios(S5PC100_GPF0(0), 8);
  27. s5pc100_fb_setgpios(S5PC100_GPF1(0), 8);
  28. s5pc100_fb_setgpios(S5PC100_GPF2(0), 8);
  29. s5pc100_fb_setgpios(S5PC100_GPF3(0), 4);
  30. }