am1808_lowlevel.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * SoC-specific lowlevel code for AM1808 and similar chips
  3. *
  4. * Copyright (C) 2011
  5. * Heiko Schocher, DENX Software Engineering, hs@denx.de.
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  23. */
  24. #ifndef __AM1808_LOWLEVEL_H
  25. #define __AM1808_LOWLEVEL_H
  26. /* NOR Boot Configuration Word Field Descriptions */
  27. #define AM1808_NORBOOT_COPY_XK(X) ((X - 1) << 8)
  28. #define AM1808_NORBOOT_METHOD_DIRECT (1 << 4)
  29. #define AM1808_NORBOOT_16BIT (1 << 0)
  30. #define dv_maskbits(addr, val) \
  31. writel((readl(addr) & val), addr)
  32. void am1808_waitloop(unsigned long loopcnt);
  33. int am1808_pll_init(struct davinci_pllc_regs *reg, unsigned long pllmult);
  34. void am1808_lpc_transition(unsigned char pscnum, unsigned char module,
  35. unsigned char domain, unsigned char state);
  36. int am1808_ddr_setup(unsigned int freq);
  37. void am1808_psc_init(void);
  38. void am1808_pinmux_ctl(unsigned long offset, unsigned long mask,
  39. unsigned long value);
  40. #endif /* #ifndef __AM1808_LOWLEVEL_H */