Bin Meng | f17cea6 | 2015-04-24 18:10:04 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com> |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <asm/tables.h> |
| 9 | |
| 10 | u8 table_compute_checksum(void *v, int len) |
| 11 | { |
| 12 | u8 *bytes = v; |
| 13 | u8 checksum = 0; |
| 14 | int i; |
| 15 | |
| 16 | for (i = 0; i < len; i++) |
| 17 | checksum -= bytes[i]; |
| 18 | |
| 19 | return checksum; |
| 20 | } |
| 21 | |
| 22 | void write_tables(void) |
| 23 | { |
| 24 | u32 __maybe_unused rom_table_end = ROM_TABLE_ADDR; |
| 25 | |
Bin Meng | 7b73090 | 2015-04-28 18:37:03 +0800 | [diff] [blame] | 26 | #ifdef CONFIG_GENERATE_PIRQ_TABLE |
Bin Meng | f17cea6 | 2015-04-24 18:10:04 +0800 | [diff] [blame] | 27 | rom_table_end = write_pirq_routing_table(rom_table_end); |
| 28 | rom_table_end = ALIGN(rom_table_end, 1024); |
| 29 | #endif |
| 30 | } |