140fef049SGabe Black /* 240fef049SGabe Black * Copyright (c) 2012 The Chromium OS Authors. All rights reserved. 340fef049SGabe Black * Use of this source code is governed by a BSD-style license that can be 440fef049SGabe Black * found in the LICENSE file. 540fef049SGabe Black * 640fef049SGabe Black * Alternatively, this software may be distributed under the terms of the 740fef049SGabe Black * GNU General Public License ("GPL") version 2 as published by the Free 840fef049SGabe Black * Software Foundation. 940fef049SGabe Black */ 1040fef049SGabe Black 1140fef049SGabe Black #include <common.h> 1240fef049SGabe Black #include <physmem.h> 13*65b3c6bbSTom Rini #include <linux/compiler.h> 1440fef049SGabe Black arch_phys_memset(phys_addr_t s,int c,phys_size_t n)15*65b3c6bbSTom Riniphys_addr_t __weak arch_phys_memset(phys_addr_t s, int c, phys_size_t n) 1640fef049SGabe Black { 1740fef049SGabe Black void *s_ptr = (void *)(uintptr_t)s; 1840fef049SGabe Black 1940fef049SGabe Black assert(((phys_addr_t)(uintptr_t)s) == s); 2040fef049SGabe Black assert(((phys_addr_t)(uintptr_t)(s + n)) == s + n); 2140fef049SGabe Black return (phys_addr_t)(uintptr_t)memset(s_ptr, c, n); 2240fef049SGabe Black } 23