sromc.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * (C) Copyright 2010 Samsung Electronics
  3. * Naveen Krishna Ch <ch.naveen@samsung.com>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. *
  7. * Note: This file contains the register description for SROMC
  8. */
  9. #ifndef __ASM_ARCH_SROMC_H_
  10. #define __ASM_ARCH_SROMC_H_
  11. #define SROMC_DATA16_WIDTH(x) (1<<((x*4)+0))
  12. #define SROMC_BYTE_ADDR_MODE(x) (1<<((x*4)+1)) /* 0-> Half-word base address*/
  13. /* 1-> Byte base address*/
  14. #define SROMC_WAIT_ENABLE(x) (1<<((x*4)+2))
  15. #define SROMC_BYTE_ENABLE(x) (1<<((x*4)+3))
  16. #define SROMC_BC_TACS(x) (x << 28) /* address set-up */
  17. #define SROMC_BC_TCOS(x) (x << 24) /* chip selection set-up */
  18. #define SROMC_BC_TACC(x) (x << 16) /* access cycle */
  19. #define SROMC_BC_TCOH(x) (x << 12) /* chip selection hold */
  20. #define SROMC_BC_TAH(x) (x << 8) /* address holding time */
  21. #define SROMC_BC_TACP(x) (x << 4) /* page mode access cycle */
  22. #define SROMC_BC_PMC(x) (x << 0) /* normal(1data)page mode configuration */
  23. #ifndef __ASSEMBLY__
  24. struct s5p_sromc {
  25. unsigned int bw;
  26. unsigned int bc[4];
  27. };
  28. #endif /* __ASSEMBLY__ */
  29. /* Configure the Band Width and Bank Control Regs for required SROMC Bank */
  30. void s5p_config_sromc(u32 srom_bank, u32 srom_bw_conf, u32 srom_bc_conf);
  31. enum {
  32. FDT_SROM_PMC,
  33. FDT_SROM_TACP,
  34. FDT_SROM_TAH,
  35. FDT_SROM_TCOH,
  36. FDT_SROM_TACC,
  37. FDT_SROM_TCOS,
  38. FDT_SROM_TACS,
  39. FDT_SROM_TIMING_COUNT,
  40. };
  41. struct fdt_sromc {
  42. u8 bank; /* srom bank number */
  43. u8 width; /* bus width in bytes */
  44. unsigned int timing[FDT_SROM_TIMING_COUNT]; /* timing parameters */
  45. };
  46. #endif /* __ASM_ARCH_SROMC_H_ */