common.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Miscellaneous DA8XX functions.
  3. *
  4. * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. */
  20. #include <asm/io.h>
  21. #include <asm/arch/hardware.h>
  22. #include "common.h"
  23. #ifndef CONFIG_USE_IRQ
  24. void irq_init(void)
  25. {
  26. /*
  27. * Mask all IRQs by clearing the global enable and setting
  28. * the enable clear for all the 90 interrupts.
  29. */
  30. writel(0, &davinci_aintc_regs->ger);
  31. writel(0, &davinci_aintc_regs->hier);
  32. writel(0xffffffff, &davinci_aintc_regs->ecr1);
  33. writel(0xffffffff, &davinci_aintc_regs->ecr2);
  34. writel(0xffffffff, &davinci_aintc_regs->ecr3);
  35. }
  36. #endif
  37. /*
  38. * Enable PSC for various peripherals.
  39. */
  40. int da8xx_configure_lpsc_items(const struct lpsc_resource *item,
  41. const int n_items)
  42. {
  43. int i;
  44. for (i = 0; i < n_items; i++)
  45. lpsc_on(item[i].lpsc_no);
  46. return 0;
  47. }