03 Oct, 2017
1 commit
-
Convert the nios2 architecture to make use of the new asm-generic/io.h to
provide address mapping functions. As nios2 actually performs
non-identity mapping between physical & virtual addresses we can't
simply make use of the generic functions, with the exception of being
able to drop our no-op unmap_physmem() and definitions of unused map
flags.Feedback from architecture maintainers is welcome.
Signed-off-by: Paul Burton
Cc: Thomas Chou
19 Oct, 2016
1 commit
-
This is required for x86 and is also correct for ARM (since it is empty).
Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Signed-off-by: Alexander Graf
24 Sep, 2016
1 commit
-
Unlike Linux, nothing about errno.h is arch-specific in U-Boot.
As you see, all of arch/${ARCH}/include/asm/errno.h is just a
wrapper of . Actually, U-Boot does not
export headers to user-space, so we just have to care about the
consistency in the U-Boot tree.Now all of include directives for are gone.
Deprecate .Signed-off-by: Masahiro Yamada
Acked-by: Alexey Brodkin
18 Nov, 2015
2 commits
-
Zap ioremap(), as it is replaced by map_physmem(,,MAP_NOCACHE).
Signed-off-by: Thomas Chou
Reviewed-by: Marek Vasut -
Change ioremap() to map_physmem(), as it is more used in u-boot.
Signed-off-by: Thomas Chou
Reviewed-by: Marek Vasut
12 Nov, 2015
1 commit
-
Add memcpy_fromio() and memcpy_toio().
Signed-off-by: Thomas Chou
06 Nov, 2015
4 commits
-
As virt_to_phys() is used a lot in DMA transfer, change it
to use physaddr_mask in global data. This will save an "if"
statement and get a little faster.Signed-off-by: Thomas Chou
Acked-by: Marek Vasut -
Remove the useless parenthesis in asm/io.h as suggested
by Marek.Signed-off-by: Thomas Chou
Acked-by: Marek Vasut -
Fix the map_physmem() to do real cache mapping.
Signed-off-by: Thomas Chou
Acked-by: Marek Vasut
05 Nov, 2015
1 commit
-
The generic bitops headers are required when calling logarithmic
functions, such as ilog2().Signed-off-by: Fabio Estevam
Acked-by: Thomas Chou
Reviewed-by: Jagan Teki
23 Oct, 2015
11 commits
-
As the virtual address and physical address mapping of nios2 with
MMU are different. Add a check of MMU, and fix the mapping.Signed-off-by: Thomas Chou
Acked-by: Marek Vasut
Reviewed-by: Ley Foon Tan -
Convert dma_alloc_coherent to use memalign.
Signed-off-by: Thomas Chou
Reviewed-by: Marek Vasut -
Convert cache flush to use dm cpu data.
The original cache flush functions are written in assembly
and use CONFIG_SYS_{I,D}CACHE_SIZE... macros. It is difficult
to convert to use cache configuration in dm cpu data which is
extracted from device tree.The cacheflush.c of Linux nios2 arch uses cpuinfo structure,
which is very close to our dm cpu data. So we copy and modify
it to arch/nios2/lib/cache.c to replace the old cache.S.Signed-off-by: Thomas Chou
-
Convert ioremap() to use io_region_base in dm cpu global data.
Also remove three unused io functions, which have style issue
and are replaced by macros already.Signed-off-by: Thomas Chou
-
Remove asm/psr.h, which is not used.
Also clean up asm/sections.h and unaligned.h.Signed-off-by: Thomas Chou
Reviewed-by: Marek Vasut -
Convert altera sysid to driver model with misc uclass.
Signed-off-by: Thomas Chou
Acked-by: Chin Liang See
Reviewed-by: Simon Glass -
Convert nios2 cpu to driver model. The cpu parameters are
extracted from device tree and saved to global data structure.
We will use them to replace the custom_fpga.h .Signed-off-by: Thomas Chou
Reviewed-by: Simon Glass -
Convert altera_pio to driver model.
Signed-off-by: Thomas Chou
Acked-by: Chin Liang See
Reviewed-by: Simon Glass -
These macros can be used to clear and set multiple bits
in a register using a single call.Signed-off-by: Thomas Chou
Reviewed-by: Marek Vasut
Acked-by: Chin Liang See -
Add ioremap() to map physical address to uncached virtual
address. We need this to convert the reg address from the
device tree.The order of headers inclusion in interrupts.c is changed
because common.h will include board header that contains
IO_REGION_BASE.In the future, the IO_REGION_BASE should be decided from
the device tree.
treeSigned-off-by: Thomas Chou
Acked-by: Marek Vasut
Reviewed-by: Simon Glass -
We will need CONFIG_SYS_MALLOC_F_LEN to use serial uclass.
So we shall undefine CONFIG_SYS_GENERIC_GLOBAL_DATA, and
call board_init_f_mem() to allocates early malloc() memory
with size of CONFIG_SYS_MALLOC_F_LEN in board_f.c.Signed-off-by: Thomas Chou
Reviewed-by: Marek Vasut
28 Mar, 2015
1 commit
-
We have done with the generic board conversion for all the boards
of ARC, Blackfin, M68000, MicroBlaze, MIPS, NIOS2, Sandbox, X86.Let's select SYS_GENERIC_BOARD for those architectures, so we can
tell which architecture has finished the conversion at a glance.Signed-off-by: Masahiro Yamada
Reviewed-by: Simon Glass
Reviewed-by: Alexey Brodkin
30 Aug, 2014
1 commit
-
The nios2.h is nios2 cpu specific, and should go arch asm
directory.Signed-off-by: Thomas Chou
24 Aug, 2014
2 commits
-
This patch implements the generic board init as described in
doc/README.generic-board.Signed-off-by: Thomas Chou
Signed-off-by: Scott McNutt
Reviewed-by: Stefan Roese -
When compiling the current code on GCC 4.8.3, the following warnings
appear:warning: format '%zu' expects argument of type 'size_t', but argument
2 has type 'long unsigned int' [-Wformat=]There were many mails about such warnings on different architectures.
This patch limits itself to the nios2 architecture.The problem is that for the size_t (%zu, %zd, ...) arguments of
printf GCC does not verify the type match to size_t type. It verifies
the type match to the compiler-defined __SIZE_TYPE__ type. Thus, if
size_t is defined different from __SIZE_TYPE__ - warnings inevitably
appear.There is a comment by Thomas Chou to the (rejected) patch:
http://patchwork.ozlabs.org/patch/272102/
which explains that the older GCC toolchains (gcc-3.4.6 and gcc-4.1.2)
expect size_t to be "unsigned long" and the newer expect it to be
"unsigned int". Thus, no matter how we define size_t - either way
warnings appear when using some GCC version.By rejecting that patch, a choice was made to prefer older GCC versions
and leave the warnings when building with the newer toolchains.
Personally, I disagree with this choice...In any case, this patch proposes a way to fix the warnings for any GCC
version. Just define size_t using the __SIZE_TYPE__ compiler-defined
type and the type verification will pass.I tested that this fixes the warning on GCC 4.8.3. I don't have an
older toolchain to test with, but __SIZE_TYPE__ was definitely defined
in GCC 3.4.6, so it should work there too.Signed-off-by: Vasili Galka
Signed-off-by: Thomas Chou
13 May, 2014
1 commit
-
gd->bd->bi_baudrate is a copy of gd->baudrate.
Since baudrate is a common feature for all architectures,
keep gd->baudrate only.It is true that bi_baudrate was passed to the kernel in that structure
but it was a long time ago.Signed-off-by: Masahiro Yamada
Cc: Tom Rini
Cc: Simon Glass
Cc: Wolfgang Denk
Cc: Heiko Schocher
Acked-by: Michal Simek (For microblaze)
24 Jul, 2013
1 commit
-
Signed-off-by: Wolfgang Denk
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini
16 Mar, 2013
1 commit
-
We create a separate header file for link symbols defined by the link
scripts. It is helpful to have these all in one place and try to
make them common across architectures. Since Linux already has a similar
file, we bring this in even though many of the symbols there are not
relevant to us.Each architecture has its own asm/sections.h where symbols specifc to
that architecture can be added. For now everything except AVR32 just
includes the generic header.One change is needed in arch/avr32/lib/board.c to make this conversion
work.Reviewed-by: Tom Rini (version 5)
Signed-off-by: Simon Glass
04 Feb, 2013
1 commit
-
Move nios2 over to use generic global_data.
Signed-off-by: Simon Glass
Acked-by: Thomas Chou
02 Feb, 2013
1 commit
-
We plan to move architecture-specific data into a separate structure so
that we can make the rest of it common.As a first step, create struct arch_global_data to hold these fields.
Initially it is empty.This patch applies to all archs at once. I can split it if this is really
a pain.Signed-off-by: Simon Glass
10 Nov, 2012
1 commit
-
The file has a wrong inline keyword of __led_toggle(), which causes
compilation error. And its content is defined in common status_led.h.
So define CONFIG_BOARD_SPECIFIC_LED in board config files and remove
this header file.Signed-off-by: Thomas Chou
20 Oct, 2012
1 commit
-
These don't need to be longs, so change them.
Signed-off-by: Simon Glass
Signed-off-by: Tom Rini
10 Aug, 2012
1 commit
-
All the global flag defines are the same across all arches. So unify them
in one place, and add a simple way for arches to extend for their needs.Signed-off-by: Mike Frysinger
16 May, 2012
1 commit
-
This field gets read in one place (by "bdinfo"), and we can replace
that with getenv("ipaddr"). After all, the bi_ip_addr field is kept
up-to-date implicitly with the value of the ipaddr env var.Signed-off-by: Mike Frysinger
Reviewed-by: Joe Hershberger
28 Oct, 2011
1 commit
-
This driver may handle multiple PIO cores and thus needs to be
setup by calling the altera_pio_init() function within the early
board setup routine.The driver comes with some extras, see below the copyleft header.
Signed-off-by: Joachim Foerster
Tested-by: Thomas Chou
Signed-off-by: Thomas Chou
24 Oct, 2011
1 commit
-
Signed-off-by: Anton Staaf
Cc: Mike Frysinger
Cc: Lukasz Majewski
Cc: Scott McNutt
06 Oct, 2011
3 commits
-
This pushes the ugly duplicated arch ifdef lists we maintain in various
image related files out to the arch headers themselves.Acked-by: Nobuhiro Iwamatsu
Tested-by: Thomas Chou
Signed-off-by: Mike Frysinger -
The current post_log_word in global data is currently split into 2x
16 bits: half for the test start, half for the test success.
Since we alredy have more than 16 POST tests defined and more could
be defined, this may result in an overflow and the post_output_backlog
would not work for the tests defined further of these 16 positions.An additional field is added to global data so that we can now support up
to 32 (depending of architecture) tests. The post_log_word is only used
to record the start of the test and the new field post_log_res for the
test success (or failure). The post_output_backlog is for this change
also adapted.Signed-off-by: Valentin Longchamp
-
Allow redirection of console output prior to console initialisation to a
temporary buffer.To enable this functionality, the board (or arch) must define:
- CONFIG_PRE_CONSOLE_BUFFER - Enable pre-console buffer
- CONFIG_PRE_CON_BUF_ADDR - Base address of pre-console buffer
- CONFIG_PRE_CON_BUF_SZ - Size of pre-console buffer (in bytes)The pre-console buffer will buffer the last CONFIG_PRE_CON_BUF_SZ bytes
Any earlier characters are silently dropped.