Re: [U-Boot] [PATCH] drivers/block/systemace: replaced in16/out16 with more common readw/writew macros

Dear Alexey,
please don't top post / full quote, and please keep the ML on Cc: - thanks.
In message CAML3pwX=dfC4vfRfg-Rft5Xuem7q4-7VjtmySvitzWzY3z8JBg@mail.gmail.com you wrote:
And what if you use "__raw_writew"/"__raw_readw" instead?
I'd rather not try that, as the __raw_* functions are missing the memory barriers that are mandatory for such device access.
Best regards,
Wolfgang Denk

Hi Wolfgang,
but then do you think if there's any way to use some generic read/write routines? The problem is we use ml509 board loaded with Synopsys DW ACR700 core and we need to access SystemACE CF-card controller (to boot Linux kernel mainly).
Or should I just add conditional branch for ARC architecture?
Regards, Alexey
2013/1/3 Wolfgang Denk wd@denx.de:
Dear Alexey,
please don't top post / full quote, and please keep the ML on Cc: - thanks.
In message CAML3pwX=dfC4vfRfg-Rft5Xuem7q4-7VjtmySvitzWzY3z8JBg@mail.gmail.com you wrote:
And what if you use "__raw_writew"/"__raw_readw" instead?
I'd rather not try that, as the __raw_* functions are missing the memory barriers that are mandatory for such device access.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Hegel was right when he said that we learn from history that man can never learn anything from history. - George Bernard Shaw

Dear Alexey,
In message CAML3pwXy7_FiVqJvgmm4-aHbspdY6BnMsZonYfzcw_hA9Fe_fw@mail.gmail.com you wrote:
but then do you think if there's any way to use some generic read/write routines?
For reference, please see section "KERNEL I/O BARRIER EFFECTS" in the Linux kernel Documentation/memory-barriers.txt file. According to that, we should strive to using ioreadX(), iowriteX() (and some kernel hackers actually support such an oppinion) - however, there is little support for thjis in existing code.
ARM traditionally tends to be using readX(), writeX(), at least on the LE implmentamtions (I don't know what the BE variants do). PowerPC has tradtitionally been using inX(), outX() resp. their explicit counterparts in_leX() / in_beX() / out_leX() / out_beX(). These functions are also available in ARM, and have been used for drivers for IP blocks shared between SoCs of different architectures.
The problem is we use ml509 board loaded with Synopsys DW ACR700 core and we need to access SystemACE CF-card controller (to boot Linux kernel mainly).
Or should I just add conditional branch for ARC architecture?
Is there a need to change the driver at all? Can you not just provide the needed inX(), outX() accessors for your architecture?
Best regards,
Wolfgang Denk
participants (2)
-
Wolfgang Denk
-
Алексей Бродкин