X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=post%2Fcpu%2Fppc4xx%2Focm.c;h=bbf2d9a8ee027e7677c6a71052d93049c4d1b74b;hb=da684a646d0c94f7a6126e7ecf110278691465a6;hp=88aa93ea1e04254f93a6817f545c19a24c1215f6;hpb=9d2459f3532c009bb903b02b57079a3862420a5f;p=platform%2Fkernel%2Fu-boot.git diff --git a/post/cpu/ppc4xx/ocm.c b/post/cpu/ppc4xx/ocm.c index 88aa93e..bbf2d9a 100644 --- a/post/cpu/ppc4xx/ocm.c +++ b/post/cpu/ppc4xx/ocm.c @@ -3,23 +3,7 @@ * * Developed for DENX Software Engineering GmbH * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -38,19 +22,19 @@ DECLARE_GLOBAL_DATA_PTR; #define OCM_TEST_PATTERN1 0x55555555 #define OCM_TEST_PATTERN2 0xAAAAAAAA -#if CONFIG_POST & CFG_POST_OCM +#if CONFIG_POST & CONFIG_SYS_POST_OCM static uint ocm_status_read(void) { - return in_be32((void *)CFG_OCM_STATUS_ADDR) & - CFG_OCM_STATUS_MASK; + return in_be32((void *)CONFIG_SYS_OCM_STATUS_ADDR) & + CONFIG_SYS_OCM_STATUS_MASK; } static void ocm_status_write(uint value) { - out_be32((void *)CFG_OCM_STATUS_ADDR, value | - (in_be32((void *)CFG_OCM_STATUS_ADDR) & - ~CFG_OCM_STATUS_MASK)); + out_be32((void *)CONFIG_SYS_OCM_STATUS_ADDR, value | + (in_be32((void *)CONFIG_SYS_OCM_STATUS_ADDR) & + ~CONFIG_SYS_OCM_STATUS_MASK)); } static inline int ocm_test_word(uint value, uint *address) @@ -68,11 +52,11 @@ int ocm_post_test(int flags) { uint old_value; int ret = 0; - uint *address = (uint*)CFG_OCM_BASE; + uint *address = (uint*)CONFIG_SYS_OCM_BASE; - if (ocm_status_read() == CFG_OCM_STATUS_OK) + if (ocm_status_read() == CONFIG_SYS_OCM_STATUS_OK) return 0; - for (; address < (uint*)(CFG_OCM_BASE + CFG_OCM_SIZE); address++) { + for (; address < (uint*)(CONFIG_SYS_OCM_BASE + CONFIG_SYS_OCM_SIZE); address++) { old_value = *address; if (ocm_test_word(OCM_TEST_PATTERN1, address) || ocm_test_word(OCM_TEST_PATTERN2, address)) { @@ -83,7 +67,7 @@ int ocm_post_test(int flags) } *address = old_value; } - ocm_status_write(ret ? CFG_OCM_STATUS_FAIL : CFG_OCM_STATUS_OK); + ocm_status_write(ret ? CONFIG_SYS_OCM_STATUS_FAIL : CONFIG_SYS_OCM_STATUS_OK); return ret; } -#endif /* CONFIG_POST & CFG_POST_OCM */ +#endif /* CONFIG_POST & CONFIG_SYS_POST_OCM */