flash_asm.S 872 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * -*- mode:c -*-
  3. *
  4. * (C) Copyright 2000
  5. * Marius Groeger <mgroeger@sysgo.de>
  6. * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  7. *
  8. * void ull_write(unsigned long long volatile *address,
  9. * unsigned long long volatile *data)
  10. * r3 = address
  11. * r4 = data
  12. *
  13. * void ull_read(unsigned long long volatile *address,
  14. * unsigned long long volatile *data)
  15. * r3 = address
  16. * r4 = data
  17. *
  18. * Uses the floating point unit to read and write 64 bit wide
  19. * data (unsigned long long) on the 60x bus. This is necessary
  20. * because all 4 flash chips use the /WE line from byte lane 0
  21. *
  22. * IMPORTANT: data should always be 8-aligned, otherwise an exception will
  23. * occur.
  24. */
  25. #include <ppc_asm.tmpl>
  26. #include <ppc_defs.h>
  27. .globl ull_write
  28. ull_write:
  29. lfd 0,0(r4)
  30. stfd 0,0(r3)
  31. blr
  32. .globl ull_read
  33. ull_read:
  34. lfd 0, 0(r3)
  35. stfd 0, 0(r4)
  36. blr