wdenk | 4a5b6a3 | 2001-04-28 17:59:11 +0000 | [diff] [blame] | 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 | |
| 26 | #include <ppc_asm.tmpl> |
| 27 | #include <ppc_defs.h> |
| 28 | |
wdenk | 70764a3 | 2003-06-26 22:04:09 +0000 | [diff] [blame] | 29 | .globl ull_write |
wdenk | 4a5b6a3 | 2001-04-28 17:59:11 +0000 | [diff] [blame] | 30 | ull_write: |
| 31 | lfd 0,0(r4) |
| 32 | stfd 0,0(r3) |
| 33 | blr |
| 34 | |
| 35 | .globl ull_read |
| 36 | ull_read: |
| 37 | lfd 0, 0(r3) |
| 38 | stfd 0, 0(r4) |
| 39 | blr |