ecard.S 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * linux/arch/arm/lib/ecard.S
  3. *
  4. * Copyright (C) 1995, 1996 Russell King
  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 version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * 27/03/03 Ian Molton Clean up CONFIG_CPU
  11. *
  12. */
  13. #include <linux/linkage.h>
  14. #include <asm/assembler.h>
  15. #include <mach/hardware.h>
  16. #define CPSR2SPSR(rt) \
  17. mrs rt, cpsr; \
  18. msr spsr_cxsf, rt
  19. @ Purpose: call an expansion card loader to read bytes.
  20. @ Proto : char read_loader(int offset, char *card_base, char *loader);
  21. @ Returns: byte read
  22. ENTRY(ecard_loader_read)
  23. stmfd sp!, {r4 - r12, lr}
  24. mov r11, r1
  25. mov r1, r0
  26. CPSR2SPSR(r0)
  27. mov lr, pc
  28. mov pc, r2
  29. ldmfd sp!, {r4 - r12, pc}
  30. @ Purpose: call an expansion card loader to reset the card
  31. @ Proto : void read_loader(int card_base, char *loader);
  32. @ Returns: byte read
  33. ENTRY(ecard_loader_reset)
  34. stmfd sp!, {r4 - r12, lr}
  35. mov r11, r0
  36. CPSR2SPSR(r0)
  37. mov lr, pc
  38. add pc, r1, #8
  39. ldmfd sp!, {r4 - r12, pc}