ecard.S 978 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * linux/arch/arm26/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. #include <linux/linkage.h>
  11. #include <asm/assembler.h>
  12. #include <asm/hardware.h>
  13. #define CPSR2SPSR(rt)
  14. @ Purpose: call an expansion card loader to read bytes.
  15. @ Proto : char read_loader(int offset, char *card_base, char *loader);
  16. @ Returns: byte read
  17. ENTRY(ecard_loader_read)
  18. stmfd sp!, {r4 - r12, lr}
  19. mov r11, r1
  20. mov r1, r0
  21. CPSR2SPSR(r0)
  22. mov lr, pc
  23. mov pc, r2
  24. LOADREGS(fd, sp!, {r4 - r12, pc})
  25. @ Purpose: call an expansion card loader to reset the card
  26. @ Proto : void read_loader(int card_base, char *loader);
  27. @ Returns: byte read
  28. ENTRY(ecard_loader_reset)
  29. stmfd sp!, {r4 - r12, lr}
  30. mov r11, r0
  31. CPSR2SPSR(r0)
  32. mov lr, pc
  33. add pc, r1, #8
  34. LOADREGS(fd, sp!, {r4 - r12, pc})