
Dear "kevin.morfitt@fearnside-systems.co.uk",
In message 4A263923.2030703@fearnside-systems.co.uk you wrote:
+#define BWSCON 0x48000000
+#define DW8 (0x0) +#define DW16 (0x1) +#define DW32 (0x2) +#define WAIT (0x1 << 2) +#define UBLB (0x1 << 3)
what is all theses macro? for what use?
They make setting the fields of the memory controller registers more readable. For example BSWCON is the Bus Width and Wait Control Register, DW32 sets a Data Width value bit-field in BWSCON to 8-bit etc. They're used later in the patch to configure the memory controller registers. The names are the same as those used in the S3C2440 data sheet.
Please make sure to use C structs to descrive device register layout, and use proper I/O accessor functions for the actual access.
- gpio->GPBCON = 0x00055555;
- gpio->GPBUP = 0x000007FF;
- gpio->GPBDAT = 0x000001C0; /* Switch on LED1. */
- gpio->GPCCON = 0xAAAAAAAA;
- gpio->GPCUP = 0x0000FFFF;
- gpio->GPDCON = 0xAAAAAAAA;
Such code will not be accepted. Please use C structs and I/O accessor functions.
Best regards,
Wolfgang Denk