sromc.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * (C) Copyright 2010 Samsung Electronics
  3. * Naveen Krishna Ch <ch.naveen@samsung.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  18. * MA 02111-1307 USA
  19. *
  20. * Note: This file contains the register description for SROMC
  21. *
  22. */
  23. #ifndef __ASM_ARCH_SROMC_H_
  24. #define __ASM_ARCH_SROMC_H_
  25. #define SROMC_DATA16_WIDTH(x) (1<<((x*4)+0))
  26. #define SROMC_BYTE_ADDR_MODE(x) (1<<((x*4)+1)) /* 0-> Half-word base address*/
  27. /* 1-> Byte base address*/
  28. #define SROMC_WAIT_ENABLE(x) (1<<((x*4)+2))
  29. #define SROMC_BYTE_ENABLE(x) (1<<((x*4)+3))
  30. #define SROMC_BC_TACS(x) (x << 28) /* address set-up */
  31. #define SROMC_BC_TCOS(x) (x << 24) /* chip selection set-up */
  32. #define SROMC_BC_TACC(x) (x << 16) /* access cycle */
  33. #define SROMC_BC_TCOH(x) (x << 12) /* chip selection hold */
  34. #define SROMC_BC_TAH(x) (x << 8) /* address holding time */
  35. #define SROMC_BC_TACP(x) (x << 4) /* page mode access cycle */
  36. #define SROMC_BC_PMC(x) (x << 0) /* normal(1data)page mode configuration */
  37. #ifndef __ASSEMBLY__
  38. struct s5p_sromc {
  39. unsigned int bw;
  40. unsigned int bc[4];
  41. };
  42. #endif /* __ASSEMBLY__ */
  43. /* Configure the Band Width and Bank Control Regs for required SROMC Bank */
  44. void s5p_config_sromc(u32 srom_bank, u32 srom_bw_conf, u32 srom_bc_conf);
  45. #endif /* __ASM_ARCH_SROMC_H_ */