The coating that you are referring to is called parging. The reason that it is flaking off is because there has been a buildup of moisture and frost in that area. Rain gutters and proper landscaping will help in the future. In the meantime, to repair the parging take a hammer and bang away at the wall until all the loose material falls free. If it sounds hollow behind the wall, keep hammering until all the loose material falls. If it sounds solid, then the parging is attached and you can leave it alone. Once the wall has been freed of loose debris, apply a super-adhering primer specifically designed for parging. This will help guarantee that the new parging will stick to the old. The primer can be applied directly to the wall and the parging is then applied over the primer. If the parging is not already polymer-modified, the primer can also be used in place of the water to mix the parging as well. As with all wall construction and repair, a metal mesh will better hold the parging in place.