ecard.S 1023 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. #define CPSR2SPSR(rt) \
  16. mrs rt, cpsr; \
  17. msr spsr_cxsf, rt
  18. @ Purpose: call an expansion card loader to read bytes.
  19. @ Proto : char read_loader(int offset, char *card_base, char *loader);
  20. @ Returns: byte read
  21. ENTRY(ecard_loader_read)
  22. stmfd sp!, {r4 - r12, lr}
  23. mov r11, r1
  24. mov r1, r0
  25. CPSR2SPSR(r0)
  26. mov lr, pc
  27. mov pc, r2
  28. ldmfd sp!, {r4 - r12, pc}
  29. @ Purpose: call an expansion card loader to reset the card
  30. @ Proto : void read_loader(int card_base, char *loader);
  31. @ Returns: byte read
  32. ENTRY(ecard_loader_reset)
  33. stmfd sp!, {r4 - r12, lr}
  34. mov r11, r0
  35. CPSR2SPSR(r0)
  36. mov lr, pc
  37. add pc, r1, #8
  38. ldmfd sp!, {r4 - r12, pc}