diff --git a/README b/README index 246ae2badca47cefc8106de76bc2adfbbee859e4..c90f6ee2d9dea89b8ca50b5563d6eaffc701342d 100644 --- a/README +++ b/README @@ -3912,10 +3912,10 @@ For PowerPC, the following registers have specific use: average for all boards 752 bytes for the whole U-Boot image, 624 text + 127 data). -On Blackfin, the normal C ABI (except for P5) is followed as documented here: +On Blackfin, the normal C ABI (except for P3) is followed as documented here: http://docs.blackfin.uclinux.org/doku.php?id=application_binary_interface - ==> U-Boot will use P5 to hold a pointer to the global data + ==> U-Boot will use P3 to hold a pointer to the global data On ARM, the following registers are used: diff --git a/doc/README.standalone b/doc/README.standalone index 81b949a0aaad4ccdf9d1115add30dc27b9fb6abe..885c92fb3a27d969c0b60bbbf2174dedcb2deccb 100644 --- a/doc/README.standalone +++ b/doc/README.standalone @@ -21,7 +21,7 @@ Design Notes on Exporting U-Boot Functions to Standalone Applications: 2. The pointer to the jump table is passed to the application in a machine-dependent way. PowerPC, ARM, MIPS and Blackfin architectures use a dedicated register to hold the pointer to the 'global_data' - structure: r2 on PowerPC, r8 on ARM, k0 on MIPS, and P5 on Blackfin. + structure: r2 on PowerPC, r8 on ARM, k0 on MIPS, and P3 on Blackfin. The x86 architecture does not use such a register; instead, the pointer to the 'global_data' structure is passed as 'argv[-1]' pointer. diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c index a8cb954282139a9b80ad6f1baef05a59084cc0d2..339bbf9b56dc9725f3b71f4f7e43c8e5d806d4e7 100644 --- a/examples/standalone/stubs.c +++ b/examples/standalone/stubs.c @@ -127,14 +127,14 @@ gd_t *global_data; : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r5"); #elif defined(CONFIG_BLACKFIN) /* - * P5 holds the pointer to the global_data, P0 is a call-clobbered + * P3 holds the pointer to the global_data, P0 is a call-clobbered * register */ #define EXPORT_FUNC(x) \ asm volatile ( \ " .globl _" #x "\n_" \ #x ":\n" \ -" P0 = [P5 + %0]\n" \ +" P0 = [P3 + %0]\n" \ " P0 = [P0 + %1]\n" \ " JUMP (P0)\n" \ : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "P0"); diff --git a/include/asm-blackfin/global_data.h b/include/asm-blackfin/global_data.h index 5c9903bb150228e1a0d1c963b6ddfdb61cd62a59..3194b72a537105337b8aac7e1b85b760cb71a118 100644 --- a/include/asm-blackfin/global_data.h +++ b/include/asm-blackfin/global_data.h @@ -66,6 +66,6 @@ typedef struct global_data { #define GD_FLG_LOGINIT 0x00020 /* Log Buf has been initialized */ #define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out) */ -#define DECLARE_GLOBAL_DATA_PTR register gd_t * volatile gd asm ("P5") +#define DECLARE_GLOBAL_DATA_PTR register gd_t * volatile gd asm ("P3") #endif diff --git a/lib_blackfin/config.mk b/lib_blackfin/config.mk index a7e3658c3efebf1a2c73624c7a87a31746615e01..34b53e6903b6df055323ff50d9a0e96f206e65f4 100644 --- a/lib_blackfin/config.mk +++ b/lib_blackfin/config.mk @@ -28,7 +28,7 @@ CONFIG_BFIN_BOOT_MODE := $(strip $(subst ",,$(CONFIG_BFIN_BOOT_MODE))) CONFIG_ENV_OFFSET := $(strip $(subst ",,$(CONFIG_ENV_OFFSET))) CONFIG_ENV_SIZE := $(strip $(subst ",,$(CONFIG_ENV_SIZE))) -PLATFORM_RELFLAGS += -ffixed-P5 -fomit-frame-pointer -mno-fdpic +PLATFORM_RELFLAGS += -ffixed-P3 -fomit-frame-pointer -mno-fdpic PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN LDFLAGS += --gc-sections